After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 601280 - Soup Fly improvement to handle state history and connection states.
Soup Fly improvement to handle state history and connection states.
Status: RESOLVED WONTFIX
Product: epiphany-extensions
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: epiphany-extensions-maint
epiphany-extensions-maint
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2009-11-09 16:59 UTC by José Millán Soto
Modified: 2013-05-27 16:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Soup Fly imporvement (46.69 KB, patch)
2009-11-09 16:59 UTC, José Millán Soto
none Details | Review
Soup Fly improvement (53.31 KB, patch)
2009-11-16 14:24 UTC, José Millán Soto
needs-work Details | Review
Soup Fly improvement (53.81 KB, patch)
2010-02-02 17:14 UTC, José Millán Soto
needs-work Details | Review
Soup Fly improvements (62.22 KB, patch)
2010-04-05 18:07 UTC, José Millán Soto
needs-work Details | Review

Description José Millán Soto 2009-11-09 16:59:48 UTC
Created attachment 147286 [details] [review]
Soup Fly imporvement

This patch makes Soup Fly handle the state of the connections and also the
history of the previous states each message or connection has been.
The new Soup Fly window is divided in two areas, in the superior area two
tables are avaliable, one of them shows the messages and the other one shows
the connections.
Once an element is selected, a table is shown in the inferior area which shows
each state the connection or message has been in, and at which time the state
was reached.

This patch needs the one proposed in
https://bugzilla.gnome.org/show_bug.cgi?id=598163#c7 to be commited to work.
Comment 1 José Millán Soto 2009-11-12 12:53:36 UTC
Comment on attachment 147286 [details] [review]
Soup Fly imporvement

The patch is now being redone.
Comment 2 José Millán Soto 2009-11-16 14:24:02 UTC
Created attachment 147892 [details] [review]
Soup Fly improvement

This patch is based on the previous one, but it will work once the patch proposed in https://bugzilla.gnome.org/show_bug.cgi?id=598163#c10 is commited.
Comment 3 Diego Escalante Urrelo (not reading bugmail) 2010-01-31 01:35:02 UTC
Review of attachment 147892 [details] [review]:

Just update the style fixes and let's get it in. Even better if you have an updated version.

::: extensions/soup-fly/soup-fly.c
@@ +27,2 @@
 #include <glib/gi18n-lib.h>
+#include <glib/gprintf.h>

Isn't glib.h enough?

@@ +268,3 @@
+*/
+static gchar
+*message_get_uri (FlyMessageData *data, gint state)

Style nitpick, the * goes in the first line.

@@ +274,3 @@
+  if (data->uri_entries) {
+    if (state < 0)
+      entry = g_list_last (data->uri_entries);

Style: include the { } for the if. You are doing so for the if just after this else.

@@ +334,3 @@
+       ((old_state == CONNECTION_STATE_TUNNELING) && (state == CONNECTION_STATE_INUSE)) )
+    return;
+  if (state == old_state) return;

Mmm, this looks a bit messy, can't you do it only in one line?, anyway try to put blank lines after the variables declared so it's obvious this can return here.

@@ +480,3 @@
+    if (state == CONNECTION_STATE_CLEANEDUP) {
+      int connection_number;
+      FlyConnectionData *con_data;

Put a blank line after the variables, nitpick :)

@@ +485,3 @@
+                          -1);
+      if ( (con_data = g_hash_table_lookup (priv->connection_data, &connection_number)) )
+        free_connection_data(con_data, logger);

In general try to add a blank line after an if() without {}, so it's obvious what was the line executed by the condition.
Also don't put the extra space between the parenthesis in that if ( (.

@@ +710,3 @@
+                                        G_TYPE_INT,
+                                        G_TYPE_INT,
+                                        G_TYPE_STRING) );

That's GTK_TREE_MODEL (gtk_..., note the space after MODEL and not after the (.

@@ +760,2 @@
+  column = gtk_tree_view_column_new ();
+  gtk_tree_view_column_set_title (column, _("C. #"));

Can you add a comment for translators?
Comment 4 José Millán Soto 2010-02-02 17:14:41 UTC
Created attachment 152859 [details] [review]
Soup Fly improvement

This patch solves the problems commented by Diego Escalante in c3.
Comment 5 José Millán Soto 2010-02-02 17:15:53 UTC
> This patch solves the problems commented by Diego Escalante in c3.

I forgot to mention that this version of the patch also adds two labels at the top of the connection list and the message list.
Comment 6 Diego Escalante Urrelo (not reading bugmail) 2010-02-20 02:09:29 UTC
Review of attachment 152859 [details] [review]:

I got this warning José:

(epiphany:14226): Gtk-WARNING **: gtk_scrolled_window_add(): cannot add non scrollable widget use gtk_scrolled_window_add_with_viewport() instead

Also try attaching with git format-patch -1 <commit id> so it can be applied with git bz apply or git am.

Overall, just style fixes to apply, watch those spaces after/before parenthesis. It's if (blah) instead of if ( blah ).

Btw can you extract http headers from Soup? It would be a bit too much for this extension maybe but it would be useful for some people surely. We had livehttpheaders for mozilla.

::: extensions/soup-fly/soup-fly.c
@@ +685,1 @@
+  if ( !SOUP_IS_ADDRESS(host) )

No space in the parenthesis: if (!SOUP...)

@@ +892,3 @@
+static void
+generate_containers_and_buttons (SoupFly *logger)
+{

Can't you use GtkBuilder for this? It seems it's a lot of code that could be more suited for a .ui file made in glade.

@@ +1175,3 @@
+  GObject *obj;
+  g_return_if_fail ( (obj = G_OBJECT (connection)) );
+  g_return_if_fail ( !g_object_get_data (obj, "FlyConnectionData") );

No space after parenthesis: g_return_if_fail ((obj.... ));

@@ +1229,3 @@
+  g_object_get (conn,
+                "message", &msg,
+                NULL);

If it fits one line, just go ahead.
Comment 7 José Millán Soto 2010-04-05 18:07:46 UTC
Created attachment 157990 [details] [review]
Soup Fly improvements

New version of the patch, which uses GtkBuilder and solves the style problems appointed in comment 6.
Comment 8 Dan Winship 2010-12-07 14:16:04 UTC
just played around with this and it looks good, but i saw g_warnings about g_object_weak_unref() on the console, so there's something not quite right
Comment 9 Dan Winship 2012-08-25 12:38:52 UTC
Comment on attachment 157990 [details] [review]
Soup Fly improvements

Maybe since we've gone 2 years without committing this we don't actually need it, but if it's going to land now, it should be redone to use the SoupMessage::network-event signal rather than SoupSession::connection-created and SoupSession::tunneling.
Comment 10 André Klapper 2013-05-27 16:11:08 UTC
According to its developer, epiphany-extensions is not under active development
anymore. (For reference: https://mail.gnome.org/archives/gnome-i18n/2013-May/msg00035.html and bug 700924.)

It is unlikely that there will be any further active development.

Closing this report as WONTFIX as part of Bugzilla Housekeeping - Please feel
free to reopen this bug report in the future if anyone takes the responsibility
for active development again.