Ethereal-dev: Re: [Ethereal-dev] Re: Patch to prevent loop in flow analysis graph
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Alejandro Vaquero <alejandrovaquero@xxxxxxxxx>
Date: Wed, 24 Aug 2005 10:33:04 -0600
Hi Ronnie, Not sure if my previous patch was applied (it is attached), but my patch removed this part of the code because it was also causing a problem when resizing the windows vertical. So, I opted to remove that part that actually resized the "time" panel in the window. Now that panel is fixed. Regards Alejandro ronnie sahlberg wrote: checked in, you are the same Graeme Hewson as the one with a different email in the AUTHORS file? On 8/23/05, Graeme Hewson <ghewson@xxxxxxxxxxxxxxxxxxx> wrote:A "feature" of GTK 1 which gtk/graph_analysis.c works around is also present in GTK 2.2.1. This patch simply extends the workaround._______________________________________________ Ethereal-dev mailing list Ethereal-dev@xxxxxxxxxxxx http://www.ethereal.com/mailman/listinfo/ethereal-dev |
--- Begin Message ---From: Alejandro Vaquero <alejandrovaquero@xxxxxxxxx>Date: Sun, 21 Aug 2005 16:26:05 -0600Hi All, find attached a patch for this. Regards Alejandro Lars Ruoff wrote:Hi, i found some unexpected UI behaviour with the Voip Calls/Graph dialog on Version 0.10.12 on Windows XP Service Pack 1, build 2600: * when increasing horizontal window size, the additional space is added to both right and left pane, however when reducing the size again, the space is cut off only from the left pane => unexpected. * increasing vertical size => ok, reducing vertical size can only be done in steps of about one line height (?) => annoying. best regards, Lars Ruoff _______________________________________________ Ethereal-dev mailing list Ethereal-dev@xxxxxxxxxxxx http://www.ethereal.com/mailman/listinfo/ethereal-devIndex: graph_analysis.c =================================================================== --- graph_analysis.c (revision 14970) +++ graph_analysis.c (working copy) @@ -184,21 +184,6 @@ user_data->dlg.window = NULL; } -/****************************************************************************/ -#if 0 -static void dialog_graph_set_title(graph_analysis_data_t* user_data) -{ - char *title; - if (!user_data->dlg.window){ - return; - } - title = g_strdup_printf("Ale"); - - gtk_window_set_title(GTK_WINDOW(user_data->dlg.window), title); - g_free(title); -} -#endif - #define RIGHT_ARROW 1 #define LEFT_ARROW 0 #define WIDTH_ARROW 8 @@ -671,7 +656,7 @@ top_y_border=TOP_Y_BORDER; /* to display the node address */ bottom_y_border=2; - draw_height=user_data->dlg.pixmap_height-top_y_border-bottom_y_border; + draw_height=user_data->dlg.draw_area->allocation.height-top_y_border-bottom_y_border; first_item = user_data->dlg.first_item; display_items = draw_height/ITEM_HEIGHT; @@ -757,11 +742,6 @@ #endif /* resize the "time" draw area */ -#if GTK_MAJOR_VERSION >= 2 - /* in GTK 1 it causes a loop of configure events */ - WIDGET_SET_SIZE(user_data->dlg.draw_area_time, label_width + 6, user_data->dlg.pixmap_height); - gtk_widget_show(user_data->dlg.draw_area_time); -#endif left_x_border=3; user_data->dlg.left_x_border = left_x_border; @@ -897,7 +877,7 @@ left_x_border+NODE_WIDTH/2+NODE_WIDTH*i, top_y_border, left_x_border+NODE_WIDTH/2+NODE_WIDTH*i, - user_data->dlg.pixmap_height-bottom_y_border); + user_data->dlg.draw_area->allocation.height-bottom_y_border); } } @@ -1352,7 +1332,6 @@ widget->allocation.width, widget->allocation.height, -1); - user_data->dlg.pixmap_height=widget->allocation.height; if ( GDK_IS_DRAWABLE(user_data->dlg.pixmap) ) gdk_draw_rectangle(user_data->dlg.pixmap, @@ -1390,8 +1369,9 @@ gdk_gc_set_rgb_fg_color(user_data->dlg.bg_gc[i], &col[i]); #endif } - + dialog_graph_redraw(user_data); + return TRUE; } @@ -1458,6 +1438,7 @@ widget->allocation.height); dialog_graph_redraw(user_data); + return TRUE; } #if GTK_MAJOR_VERSION >= 2 @@ -1541,7 +1522,10 @@ #endif /* create main Graph draw area */ user_data->dlg.draw_area=gtk_drawing_area_new(); - user_data->dlg.pixmap_width = user_data->num_nodes * NODE_WIDTH; + if (user_data->num_nodes < 2) + user_data->dlg.pixmap_width = 2 * NODE_WIDTH; + else + user_data->dlg.pixmap_width = user_data->num_nodes * NODE_WIDTH; WIDGET_SET_SIZE(user_data->dlg.draw_area, user_data->dlg.pixmap_width, user_data->dlg.pixmap_height); user_data->dlg.scroll_window=gtk_scrolled_window_new(NULL, NULL); if ( user_data->num_nodes < 6) @@ -1588,8 +1572,8 @@ gtk_box_pack_start(GTK_BOX(hbox), user_data->dlg.draw_area_time, FALSE, FALSE, 0); user_data->dlg.hpane = gtk_hpaned_new(); - gtk_paned_pack1(GTK_PANED (user_data->dlg.hpane), user_data->dlg.scroll_window, TRUE, TRUE); - gtk_paned_pack2(GTK_PANED (user_data->dlg.hpane), scroll_window_comments, FALSE, TRUE); + gtk_paned_pack1(GTK_PANED (user_data->dlg.hpane), user_data->dlg.scroll_window, FALSE, TRUE); + gtk_paned_pack2(GTK_PANED (user_data->dlg.hpane), scroll_window_comments, TRUE, TRUE); #if GTK_MAJOR_VERSION >= 2 SIGNAL_CONNECT(user_data->dlg.hpane, "notify::position", pane_callback, user_data); #endif_______________________________________________ Ethereal-dev mailing list Ethereal-dev@xxxxxxxxxxxx http://www.ethereal.com/mailman/listinfo/ethereal-dev
--- End Message ---
- Follow-Ups:
- SV: [Ethereal-dev] Re: Patch to prevent loop in flow analysis graph
- From: Anders Broman
- SV: [Ethereal-dev] Re: Patch to prevent loop in flow analysis graph
- References:
- [Ethereal-dev] Patch to prevent loop in flow analysis graph
- From: Graeme Hewson
- [Ethereal-dev] Re: Patch to prevent loop in flow analysis graph
- From: ronnie sahlberg
- [Ethereal-dev] Patch to prevent loop in flow analysis graph
- Prev by Date: [Ethereal-dev] [Bug report] Exporting in PDML causes various GLIB crashes
- Next by Date: Re: [Ethereal-dev] Obtaining previous dissector information
- Previous by thread: [Ethereal-dev] Re: Patch to prevent loop in flow analysis graph
- Next by thread: SV: [Ethereal-dev] Re: Patch to prevent loop in flow analysis graph
- Index(es):