summaryrefslogtreecommitdiff
path: root/gtk/proto_hier_stats_dlg.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2004-05-23 23:24:07 +0000
committerUlf Lamping <ulf.lamping@web.de>2004-05-23 23:24:07 +0000
commitcc6836803788de14432c597fcda0ad3154b421e4 (patch)
treecd34c8b0e8333865247f8af8e7405c950d565350 /gtk/proto_hier_stats_dlg.c
parent9332549e99c7bee165fa47b3332e683d39cbcdad (diff)
downloadwireshark-cc6836803788de14432c597fcda0ad3154b421e4.tar.gz
use new functions in window API (ui_util.h),
use window_new instead of dlg_window_new for the statistics windows (as these are no dialog windows) do some code cleanup svn path=/trunk/; revision=10979
Diffstat (limited to 'gtk/proto_hier_stats_dlg.c')
-rw-r--r--gtk/proto_hier_stats_dlg.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gtk/proto_hier_stats_dlg.c b/gtk/proto_hier_stats_dlg.c
index fbb3b4b98e..4f98863f18 100644
--- a/gtk/proto_hier_stats_dlg.c
+++ b/gtk/proto_hier_stats_dlg.c
@@ -1,6 +1,6 @@
/* proto_hier_stats_dlg.c
*
- * $Id: proto_hier_stats_dlg.c,v 1.17 2004/05/01 18:40:20 ulfl Exp $
+ * $Id: proto_hier_stats_dlg.c,v 1.18 2004/05/23 23:24:06 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -322,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);
@@ -339,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);
}