diff options
author | ulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-05-23 23:24:07 +0000 |
---|---|---|
committer | ulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-05-23 23:24:07 +0000 |
commit | 1137053444eb834f94eb6eb3d69be5a0c5b211b5 (patch) | |
tree | cd34c8b0e8333865247f8af8e7405c950d565350 /gtk/proto_hier_stats_dlg.c | |
parent | f7f837f06ba079677b00a31f3dd6ba0b5044a1e8 (diff) |
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
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10979 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk/proto_hier_stats_dlg.c')
-rw-r--r-- | gtk/proto_hier_stats_dlg.c | 13 |
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); } |