we can merge more than two files with mergecap
[obnox/wireshark/wip.git] / gtk / proto_hier_stats_dlg.c
index d0657570859925d9d98622fae1c1d3a33faab076..0777e190e8eb049c6efd78e3759c6c1969d0d422 100644 (file)
@@ -1,6 +1,6 @@
 /* proto_hier_stats_dlg.c
  *
- * $Id: proto_hier_stats_dlg.c,v 1.16 2004/03/17 21:48:15 deniel Exp $
+ * $Id$
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -302,6 +302,7 @@ create_tree(GtkWidget *container, ph_stats_t *ps)
     WIDGET_SET_SIZE(tree, DEF_DLG_WIDTH, height);
 #else
     WIDGET_SET_SIZE(tree, DEF_DLG_WIDTH, MAX_DLG_HEIGHT);
+    gtk_tree_view_expand_all(tree_view);
 #endif
 
     gtk_container_add(GTK_CONTAINER(sw), tree);
@@ -321,7 +322,7 @@ proto_hier_stats_cb(GtkWidget *w _U_, gpointer d _U_)
                return;
        }
 
-       dlg = dlg_window_new("Ethereal: Protocol Hierarchy Statistics");
+       dlg = window_new(GTK_WINDOW_TOPLEVEL, "Ethereal: Protocol Hierarchy Statistics");
 
        vbox = gtk_vbox_new(FALSE, 5);
        gtk_container_border_width(GTK_CONTAINER(vbox), 5);
@@ -338,14 +339,11 @@ proto_hier_stats_cb(GtkWidget *w _U_, gpointer d _U_)
        gtk_widget_show(bbox);
 
        ok_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_OK);
-       SIGNAL_CONNECT_OBJECT(ok_bt, "clicked", gtk_widget_destroy, dlg);
-       gtk_widget_grab_default(ok_bt);
+    window_set_cancel_button(dlg, ok_bt, window_cancel_button_cb);
 
-       /* Catch the "key_press_event" signal in the window, so that we can 
-          catch the ESC key being pressed and act as if the "OK" button had
-          been selected. */
-       dlg_set_cancel(dlg, ok_bt);
+       SIGNAL_CONNECT(dlg, "delete_event", window_delete_event_cb, NULL);
 
        gtk_widget_show_all(dlg);
+    window_present(dlg);
 }