summaryrefslogtreecommitdiff
path: root/ui/gtk/proto_hier_stats_dlg.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2013-03-07 19:25:36 +0000
committerBill Meier <wmeier@newsguy.com>2013-03-07 19:25:36 +0000
commite59c185dae590cc1cd6719391388f29d8c1268f3 (patch)
treeeded50e05ba19cfc3481ba4f8b303840b6aaa7d1 /ui/gtk/proto_hier_stats_dlg.c
parentd96c8ee09d4714c8f3037ab1a15ead8cd70682cf (diff)
downloadwireshark-e59c185dae590cc1cd6719391388f29d8c1268f3.tar.gz
Fix proto stats window size allocation so it works with GTK3.
(adapted from a suggested patch by Peter Hatina in Bug #8315) (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8315) From me: Widen the default width to show all the columns when the window is opened. svn path=/trunk/; revision=48177
Diffstat (limited to 'ui/gtk/proto_hier_stats_dlg.c')
-rw-r--r--ui/gtk/proto_hier_stats_dlg.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/gtk/proto_hier_stats_dlg.c b/ui/gtk/proto_hier_stats_dlg.c
index c51118f9f7..5ad1acb59c 100644
--- a/ui/gtk/proto_hier_stats_dlg.c
+++ b/ui/gtk/proto_hier_stats_dlg.c
@@ -437,8 +437,6 @@ proto_hier_create_popup_menu(void)
}
-#define MAX_DLG_HEIGHT 450
-#define DEF_DLG_WIDTH 700
static void
create_tree(GtkWidget *container, ph_stats_t *ps)
{
@@ -532,7 +530,6 @@ create_tree(GtkWidget *container, ph_stats_t *ps)
/* Fill in the data. */
fill_in_tree(tree, ps);
- gtk_widget_set_size_request(tree, DEF_DLG_WIDTH, MAX_DLG_HEIGHT);
gtk_tree_view_expand_all(tree_view);
proto_hier_create_popup_menu ();
@@ -540,6 +537,9 @@ create_tree(GtkWidget *container, ph_stats_t *ps)
gtk_container_add(GTK_CONTAINER(sw), tree);
}
+#define MAX_DLG_HEIGHT 450
+#define DEF_DLG_WIDTH 920
+
void
proto_hier_stats_cb(GtkWidget *w _U_, gpointer d _U_)
{
@@ -558,6 +558,7 @@ proto_hier_stats_cb(GtkWidget *w _U_, gpointer d _U_)
}
dlg = window_new(GTK_WINDOW_TOPLEVEL, "Wireshark: Protocol Hierarchy Statistics");
+ gtk_window_set_default_size(GTK_WINDOW(dlg), DEF_DLG_WIDTH, MAX_DLG_HEIGHT);
vbox = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 5, FALSE);
gtk_container_set_border_width(GTK_CONTAINER(vbox), 5);