diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2004-01-21 21:19:34 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2004-01-21 21:19:34 +0000 |
commit | 8e2a930023b7d8c86d8be142a01679a57c25e411 (patch) | |
tree | b01c1b776bcd8de0d4a71cf67505cf3b289f3772 /gtk/proto_draw.c | |
parent | d4b591b7dde96261093dca869e495adc5f6d39c9 (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/proto_draw.c')
-rw-r--r-- | gtk/proto_draw.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/gtk/proto_draw.c b/gtk/proto_draw.c index 11912b5e79..a149872d54 100644 --- a/gtk/proto_draw.c +++ b/gtk/proto_draw.c @@ -1,7 +1,7 @@ /* proto_draw.c * Routines for GTK+ packet display * - * $Id: proto_draw.c,v 1.80 2004/01/21 03:54:30 ulfl Exp $ + * $Id: proto_draw.c,v 1.81 2004/01/21 21:19:33 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -812,26 +812,18 @@ void savehex_cb(GtkWidget * w _U_, gpointer data _U_) gtk_widget_show(file_box); /* Now, the button box */ - bbox=gtk_hbutton_box_new(); - gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_DEFAULT_STYLE); - gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); - gtk_box_pack_start(GTK_BOX(dlg_box), bbox, FALSE, FALSE, 0); - gtk_widget_show(bbox); + bbox = dlg_button_row_new(GTK_STOCK_SAVE, GTK_STOCK_CANCEL, NULL); + gtk_box_pack_start(GTK_BOX(dlg_box), bbox, FALSE, FALSE, 0); + gtk_widget_show(bbox); /* the save button */ - save_button=BUTTON_NEW_FROM_STOCK(GTK_STOCK_SAVE); + save_button = OBJECT_GET_DATA(bbox, GTK_STOCK_SAVE); SIGNAL_CONNECT_OBJECT(save_button, "clicked", savehex_save_clicked_cb, NULL); - gtk_box_pack_start(GTK_BOX(bbox), save_button, TRUE, TRUE, 0); - GTK_WIDGET_SET_FLAGS(save_button, GTK_CAN_DEFAULT); gtk_widget_grab_default(save_button); - gtk_widget_show(save_button); - cancel_button=BUTTON_NEW_FROM_STOCK(GTK_STOCK_CANCEL); + cancel_button = OBJECT_GET_DATA(bbox, GTK_STOCK_CANCEL); SIGNAL_CONNECT(cancel_button, "clicked", savehex_dlg_cancel_cb, savehex_dlg); - GTK_WIDGET_SET_FLAGS(cancel_button, GTK_CAN_DEFAULT); - gtk_box_pack_start(GTK_BOX(bbox), cancel_button, TRUE, TRUE, 0); - gtk_widget_show(cancel_button); /* Catch the "activate" signal on the filter text entry, so that if the user types Return there, we act as if the "Create Stat" |