Ethereal-dev: Re: [Ethereal-dev] VoIP Calls Graph: unexpected UI behaviour
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: Sun, 21 Aug 2005 16:26:05 -0600
Hi 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-dev
Index: 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
- References:
- [Ethereal-dev] VoIP Calls Graph: unexpected UI behaviour
- From: Lars Ruoff
- [Ethereal-dev] VoIP Calls Graph: unexpected UI behaviour
- Prev by Date: Re: [Ethereal-dev] RFC: add more flags to the protocol tree for a start of an expert mode
- Next by Date: [Ethereal-dev] buildbot failure in Windows 2003 (IA32)
- Previous by thread: [Ethereal-dev] VoIP Calls Graph: unexpected UI behaviour
- Next by thread: [Ethereal-dev] requested doc section, features, & question
- Index(es):