aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/plugins_dlg.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2003-11-28 00:13:08 +0000
committerUlf Lamping <ulf.lamping@web.de>2003-11-28 00:13:08 +0000
commitcd01ca6cb034c64b07e0d7915b5b5e4a7f2da1d1 (patch)
tree749c0360e125fd667be06d52ebedce170e2891f2 /gtk/plugins_dlg.c
parent131eeab31d85afbef5558f123a6d7422e7b2d7e3 (diff)
using dlg_utils.c functions to catch the ESC key to close the dialog
svn path=/trunk/; revision=9110
Diffstat (limited to 'gtk/plugins_dlg.c')
-rw-r--r--gtk/plugins_dlg.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gtk/plugins_dlg.c b/gtk/plugins_dlg.c
index 3cde21e910..9be4a0d49d 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.30 2003/03/02 17:14:08 deniel Exp $
+ * $Id: plugins_dlg.c,v 1.31 2003/11/28 00:08:35 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -130,14 +130,21 @@ tools_plugins_cmd_cb(GtkWidget *widget _U_, gpointer data _U_)
gtk_widget_show(main_hbnbox);
#if GTK_MAJOR_VERSION < 2
- close_bn = gtk_button_new_with_label("Close");
+ close_bn = gtk_button_new_with_label("OK");
#else
- close_bn = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
+ close_bn = gtk_button_new_from_stock(GTK_STOCK_OK);
#endif
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);
+ /* 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(plugins_window, close_bn);
+
gtk_widget_show(plugins_window);
}