diff options
author | Bill Meier <wmeier@newsguy.com> | 2013-03-16 18:57:35 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2013-03-16 18:57:35 +0000 |
commit | eca156d710bdfed83cdf2a7d266be05027cc8136 (patch) | |
tree | 846bcd52602642c135286be17e7dd05698c60eb1 /ui/gtk/capture_if_dlg.c | |
parent | 263a9d068391ece88bf6678586551a5780e50ad2 (diff) |
From Jaap Keuter: Fix "GTK3: Interface List dialog does not expand properly"
From me: Add an XXX comment about an un-related issue
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8468
svn path=/trunk/; revision=48342
Diffstat (limited to 'ui/gtk/capture_if_dlg.c')
-rw-r--r-- | ui/gtk/capture_if_dlg.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/ui/gtk/capture_if_dlg.c b/ui/gtk/capture_if_dlg.c index 1f83decdd2..0f35bf4a92 100644 --- a/ui/gtk/capture_if_dlg.c +++ b/ui/gtk/capture_if_dlg.c @@ -634,7 +634,7 @@ capture_if_refresh_if_list(void) { GtkWidget *if_vb, *if_grid, *icon, *if_lb, *eb; GtkRequisition requisition; - int row = 0, height = 0, curr_height, curr_width; + int row = 0, height = 0; guint ifs; interface_t device; const gchar *addr_str; @@ -798,7 +798,11 @@ capture_if_refresh_if_list(void) row++; if (row <= 20) { - /* Lets add up 20 rows of interfaces, otherwise the window may become too high */ + /* Add up to 20 rows of interfaces, otherwise the window may become too high */ + /* XXX: Testing on Windows & Fedora (Gtk2 & Gtk3) seems to show that the height + * determined below is the same whether or not the 'get_preferred_size' in enclosed + * in 'widget_show'/'widget_hide' + */ #ifdef _WIN32 gtk_widget_show(GTK_WIDGET(data.details_bt)); gtk_widget_get_preferred_size(GTK_WIDGET(data.details_bt), &requisition, NULL); @@ -816,19 +820,7 @@ capture_if_refresh_if_list(void) /* height + static offset + what the GTK MS Windows Engine needs in addition per interface */ height += requisition.height + 40 + ifs; - if (cap_if_w) { - gtk_window_get_size(GTK_WINDOW(cap_if_w), &curr_width, &curr_height); -#ifndef _WIN32 - if (curr_height < height) - /* On windows, resetting the size regardless works around what appears to be a windows gtk bug - * with multiple nic's where the resulting dialog box is much smaller than it should be. - * note: the actual height calculation is not correct on Windows with varying - * number of interfaces but fine at this point in time. */ -#endif - gtk_window_resize(GTK_WINDOW(cap_if_w), curr_width, height); - } - else - gtk_window_set_default_size(GTK_WINDOW(cap_if_w), -1, height); + gtk_window_set_default_size(GTK_WINDOW(cap_if_w), -1, height); gtk_widget_show_all(cap_if_w); @@ -870,7 +862,7 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_) if (airpcap_if_active){ /* XXX can never happen? */ airpcap_set_toolbar_stop_capture(airpcap_if_active); - } + } airpcap_enable_toolbar_widgets(wireless_tb,FALSE); } } |