diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2004-05-26 03:49:24 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2004-05-26 03:49:24 +0000 |
commit | 7d37fc9d23181cc3dfb42d42d2655a9b97ac6062 (patch) | |
tree | 1dd3c8757f1727f8591869b656d047a48c05c477 /gtk/capture_info_dlg.c | |
parent | 3aaf65db46a1afc054911564f12a45ec2af63274 (diff) | |
download | wireshark-7d37fc9d23181cc3dfb42d42d2655a9b97ac6062.tar.gz wireshark-7d37fc9d23181cc3dfb42d42d2655a9b97ac6062.tar.bz2 wireshark-7d37fc9d23181cc3dfb42d42d2655a9b97ac6062.zip |
more code cleanup from dialog things:
changed window_xy (dialog) function calling in a lot of gtk files
cleanup of file selection code
cleanup in dlg_utils/file_dlg/ui_util
Please report any problems!!!
svn path=/trunk/; revision=11003
Diffstat (limited to 'gtk/capture_info_dlg.c')
-rw-r--r-- | gtk/capture_info_dlg.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/gtk/capture_info_dlg.c b/gtk/capture_info_dlg.c index 2a7753fd1b..5acb771418 100644 --- a/gtk/capture_info_dlg.c +++ b/gtk/capture_info_dlg.c @@ -1,7 +1,7 @@ /* capture_info_dlg.c * Routines for packet capture info dialog * - * $Id: capture_info_dlg.c,v 1.15 2004/04/14 05:46:34 ulfl Exp $ + * $Id: capture_info_dlg.c,v 1.16 2004/05/26 03:49:21 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -39,6 +39,7 @@ #include "globals.h" #include "capture_combo_utils.h" #include "dlg_utils.h" +#include "ui_util.h" /* a single capture counter value (with title, pointer to value and GtkWidgets) */ /* as the packet_counts is a struct, not an array, keep a pointer to the */ @@ -68,13 +69,6 @@ pct(gint num, gint denom) { } } -/* stop button (or ESC key) was pressed */ -static void -capture_info_stop_cb(GtkWidget *w _U_, gpointer data _U_) { - capture_stop(); -} - - static void capture_info_delete_cb(GtkWidget *w _U_, GdkEvent *event _U_, gpointer data _U_) { capture_stop(); @@ -212,18 +206,14 @@ gchar *iface) gtk_widget_show(bbox); stop_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_STOP); - gtk_widget_grab_default(stop_bt); - SIGNAL_CONNECT(stop_bt, "clicked", capture_info_stop_cb, - NULL); + window_set_cancel_button(info->cap_w, stop_bt, NULL); + SIGNAL_CONNECT(stop_bt, "clicked", capture_info_delete_cb, NULL); + SIGNAL_CONNECT(info->cap_w, "delete_event", capture_info_delete_cb, NULL); - /* Catch the "key_press_event" signal in the window, so that we can catch - the ESC key being pressed and act as if the "Stop" button had - been selected. */ - dlg_set_cancel(info->cap_w, stop_bt); - gtk_widget_show(info->cap_w); + window_present(info->cap_w); cinfo->ui = info; } @@ -275,7 +265,7 @@ capture_info *cinfo) capture_info_ui_t *info = cinfo->ui; gtk_grab_remove(GTK_WIDGET(info->cap_w)); - gtk_widget_destroy(GTK_WIDGET(info->cap_w)); + window_destroy(GTK_WIDGET(info->cap_w)); g_free(info); } |