aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/h225_counter.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/h225_counter.c
parent9332549e99c7bee165fa47b3332e683d39cbcdad (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 svn path=/trunk/; revision=10979
Diffstat (limited to 'gtk/h225_counter.c')
-rw-r--r--gtk/h225_counter.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gtk/h225_counter.c b/gtk/h225_counter.c
index 7c89e3d462..35990a0072 100644
--- a/gtk/h225_counter.c
+++ b/gtk/h225_counter.c
@@ -2,7 +2,7 @@
* h225 message counter for ethereal
* Copyright 2003 Lars Roland
*
- * $Id: h225_counter.c,v 1.19 2004/05/22 19:56:18 ulfl Exp $
+ * $Id: h225_counter.c,v 1.20 2004/05/23 23:24:05 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -523,8 +523,7 @@ gtk_h225counter_init(char *optarg)
h225counter_reset(hs);
- hs->win=dlg_window_new("Ethereal: H225 counters");
- SIGNAL_CONNECT(hs->win, "destroy", win_destroy_cb, hs);
+ hs->win=window_new(GTK_WINDOW_TOPLEVEL, "Ethereal: H225 counters");
hs->vbox=gtk_vbox_new(FALSE, 3);
gtk_container_set_border_width(GTK_CONTAINER(hs->vbox), 12);
@@ -551,15 +550,15 @@ gtk_h225counter_init(char *optarg)
gtk_box_pack_end(GTK_BOX(hs->vbox), bbox, FALSE, FALSE, 0);
close_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_CLOSE);
- SIGNAL_CONNECT_OBJECT(close_bt, "clicked", gtk_widget_destroy, hs->win);
- gtk_widget_grab_default(close_bt);
+ window_set_cancel_button(hs->win, close_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 "Close" button had
- been selected. */
- dlg_set_cancel(hs->win, close_bt);
+ SIGNAL_CONNECT(hs->win, "delete_event", window_delete_event_cb, NULL);
+ SIGNAL_CONNECT(hs->win, "destroy", win_destroy_cb, hs);
gtk_widget_show_all(hs->win);
+ window_present(hs->win);
+
+ /* XXX - shouldn't this be retap_packets? */
redissect_packets(&cfile);
}