aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/capture_info_dlg.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2004-01-21 21:19:34 +0000
committerUlf Lamping <ulf.lamping@web.de>2004-01-21 21:19:34 +0000
commit8e2a930023b7d8c86d8be142a01679a57c25e411 (patch)
treeb01c1b776bcd8de0d4a71cf67505cf3b289f3772 /gtk/capture_info_dlg.c
parentd4b591b7dde96261093dca869e495adc5f6d39c9 (diff)
implemented dlg_button_row_new to get a standard function for
layouting the dialog buttons, and use it where appropriate. This will help us with the GTK1/2 conflict on button layouts and will also result in a more consistent look of the dialogs at all. svn path=/trunk/; revision=9771
Diffstat (limited to 'gtk/capture_info_dlg.c')
-rw-r--r--gtk/capture_info_dlg.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gtk/capture_info_dlg.c b/gtk/capture_info_dlg.c
index 74657955b3..56265aaf26 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.10 2004/01/21 03:54:29 ulfl Exp $
+ * $Id: capture_info_dlg.c,v 1.11 2004/01/21 21:19:32 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -88,7 +88,7 @@ capture_info *cinfo)
{
unsigned int i;
GtkWidget *main_vb, *stop_bt, *counts_tb;
- GtkWidget *counts_fr, *running_tb, *running_label;
+ GtkWidget *counts_fr, *running_tb, *running_label, *bbox;
capture_info_ui_t *info;
info = g_malloc0(sizeof(capture_info_ui_t));
@@ -202,17 +202,16 @@ capture_info *cinfo)
/* allow user to either click a stop button, or the close button on
the window to stop a capture in progress. */
- stop_bt = BUTTON_NEW_FROM_STOCK(GTK_STOCK_STOP);
+ bbox = dlg_button_row_new(GTK_STOCK_STOP, NULL);
+ gtk_box_pack_start(GTK_BOX(main_vb), bbox, FALSE, FALSE, 3);
+ 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,
cinfo->callback_data);
SIGNAL_CONNECT(info->cap_w, "delete_event", capture_info_delete_cb,
cinfo->callback_data);
- gtk_box_pack_start(GTK_BOX(main_vb), stop_bt, FALSE, FALSE, 3);
- GTK_WIDGET_SET_FLAGS(stop_bt, GTK_CAN_DEFAULT);
- gtk_widget_grab_default(stop_bt);
- GTK_WIDGET_SET_FLAGS(stop_bt, GTK_CAN_DEFAULT);
- gtk_widget_grab_default(stop_bt);
- gtk_widget_show(stop_bt);
/* 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