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/plugins_dlg.c | |
parent | d4b591b7dde96261093dca869e495adc5f6d39c9 (diff) | |
download | wireshark-8e2a930023b7d8c86d8be142a01679a57c25e411.tar.gz wireshark-8e2a930023b7d8c86d8be142a01679a57c25e411.tar.bz2 wireshark-8e2a930023b7d8c86d8be142a01679a57c25e411.zip |
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/plugins_dlg.c')
-rw-r--r-- | gtk/plugins_dlg.c | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/gtk/plugins_dlg.c b/gtk/plugins_dlg.c index 35b0c5e3dd..1278aa7e75 100644 --- a/gtk/plugins_dlg.c +++ b/gtk/plugins_dlg.c @@ -1,7 +1,7 @@ /* plugins_dlg.c * Dialog boxes for plugins * - * $Id: plugins_dlg.c,v 1.32 2004/01/10 16:27:42 ulfl Exp $ + * $Id: plugins_dlg.c,v 1.33 2004/01/21 21:19:33 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -54,9 +54,8 @@ tools_plugins_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) GtkWidget *frame_hbox; GtkWidget *scrolledwindow; GtkWidget *plugins_list; - GtkWidget *frame_vbnbox; - GtkWidget *main_hbnbox; - GtkWidget *close_bn; + GtkWidget *bbox; + GtkWidget *ok_bt; gchar *titles[] = {"Name", "Version"}; #if GTK_MAJOR_VERSION >= 2 GtkListStore *store; @@ -115,31 +114,18 @@ tools_plugins_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) #endif gtk_widget_show(plugins_list); - frame_vbnbox = gtk_vbutton_box_new(); - gtk_box_pack_start(GTK_BOX(frame_hbox), frame_vbnbox, FALSE, TRUE, 0); - gtk_container_set_border_width(GTK_CONTAINER(frame_vbnbox), 5); - gtk_button_box_set_layout(GTK_BUTTON_BOX(frame_vbnbox), - GTK_BUTTONBOX_SPREAD); - gtk_widget_show(frame_vbnbox); - - main_hbnbox = gtk_hbutton_box_new(); - gtk_box_pack_start(GTK_BOX(main_vbox), main_hbnbox, FALSE, TRUE, 0); - gtk_container_set_border_width(GTK_CONTAINER(main_hbnbox), 5); - gtk_button_box_set_layout(GTK_BUTTON_BOX(main_hbnbox), - GTK_BUTTONBOX_SPREAD); - gtk_widget_show(main_hbnbox); - - close_bn = BUTTON_NEW_FROM_STOCK(GTK_STOCK_OK); - gtk_container_add(GTK_CONTAINER(main_hbnbox), close_bn); - GTK_WIDGET_SET_FLAGS(close_bn, GTK_CAN_DEFAULT); - gtk_widget_grab_default(close_bn); - gtk_widget_show(close_bn); - SIGNAL_CONNECT(close_bn, "clicked", plugins_close_cb, plugins_window); + bbox = dlg_button_row_new(GTK_STOCK_OK, NULL); + gtk_box_pack_end(GTK_BOX(main_vbox), bbox, FALSE, FALSE, 3); + gtk_widget_show(bbox); + + ok_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_OK); + SIGNAL_CONNECT(ok_bt, "clicked", plugins_close_cb, plugins_window); + gtk_widget_grab_default(ok_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 "Cancel" button had + the ESC key being pressed and act as if the "OK" button had been selected. */ - dlg_set_cancel(plugins_window, close_bn); + dlg_set_cancel(plugins_window, ok_bt); gtk_widget_show(plugins_window); |