summaryrefslogtreecommitdiff
path: root/gtk/io_stat.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/io_stat.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/io_stat.c')
-rw-r--r--gtk/io_stat.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/gtk/io_stat.c b/gtk/io_stat.c
index a590967e96..da0e0475c7 100644
--- a/gtk/io_stat.c
+++ b/gtk/io_stat.c
@@ -1,7 +1,7 @@
/* io_stat.c
* io_stat 2002 Ronnie Sahlberg
*
- * $Id: io_stat.c,v 1.75 2004/05/22 19:56:18 ulfl Exp $
+ * $Id: io_stat.c,v 1.76 2004/05/23 23:24:06 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1868,16 +1868,6 @@ create_filter_area(io_stat_t *io, GtkWidget *box)
}
-static void
-io_stat_close_cb(
- GtkButton *button _U_,
- gpointer parent_w)
-{
- gtk_grab_remove(GTK_WIDGET(parent_w));
- gtk_widget_destroy(GTK_WIDGET(parent_w));
-}
-
-
static void
init_io_stat_window(io_stat_t *io)
{
@@ -1886,7 +1876,7 @@ init_io_stat_window(io_stat_t *io)
GtkWidget *bt_close;
/* create the main window */
- io->window=dlg_window_new("I/O Graphs");
+ io->window=window_new(GTK_WINDOW_TOPLEVEL, "I/O Graphs");
vbox=gtk_vbox_new(FALSE, 0);
gtk_container_add(GTK_CONTAINER(io->window), vbox);
@@ -1910,15 +1900,12 @@ init_io_stat_window(io_stat_t *io)
gtk_widget_show(hbox);
bt_close = OBJECT_GET_DATA(hbox, GTK_STOCK_CLOSE);
- gtk_widget_grab_default(bt_close);
- SIGNAL_CONNECT(bt_close, "clicked", io_stat_close_cb, io->window);
+ window_set_cancel_button(io->window, bt_close, 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 "Cancel" button
- had been selected. */
- dlg_set_cancel(io->window, bt_close);
+ SIGNAL_CONNECT(io->window, "delete_event", window_delete_event_cb, NULL);
gtk_widget_show(io->window);
+ window_present(io->window);
}