aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/filter_prefs.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-02-20 20:25:08 +0000
committerGuy Harris <guy@alum.mit.edu>2001-02-20 20:25:08 +0000
commit81f6ce8b713df9edc6fa5f7c58e5eb6a00592291 (patch)
tree9ff99b6b3c4a36f853a40cc25b7de9dfe31f2c45 /gtk/filter_prefs.c
parent16091b24f19b60593eed424b6a0e9c42b24992ba (diff)
Make the "activate" signal on the text entry boxes in the filter editing
dialog activate the entire dialog box. svn path=/trunk/; revision=3062
Diffstat (limited to 'gtk/filter_prefs.c')
-rw-r--r--gtk/filter_prefs.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/gtk/filter_prefs.c b/gtk/filter_prefs.c
index 56f0dacb55..d4ffa28ea3 100644
--- a/gtk/filter_prefs.c
+++ b/gtk/filter_prefs.c
@@ -3,7 +3,7 @@
* (This used to be a notebook page under "Preferences", hence the
* "prefs" in the file name.)
*
- * $Id: filter_prefs.c,v 1.27 2001/01/28 21:30:53 guy Exp $
+ * $Id: filter_prefs.c,v 1.28 2001/02/20 20:25:08 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -567,6 +567,14 @@ filter_dialog_new(GtkWidget *caller, GtkWidget *parent_filter_te,
filter_te);
gtk_widget_grab_default(ok_bt);
gtk_widget_show(ok_bt);
+
+ /* Catch the "activate" signal on the filter name and filter
+ expression text entries, so that if the user types Return
+ there, we act as if the "OK" button had been selected, as
+ happens if Return is typed if some widget that *doesn't*
+ handle the Return key has the input focus. */
+ dlg_set_activate(name_te, ok_bt);
+ dlg_set_activate(filter_te, ok_bt);
}
if (construct_args->wants_apply_button) {
@@ -592,6 +600,11 @@ filter_dialog_new(GtkWidget *caller, GtkWidget *parent_filter_te,
gtk_box_pack_start(GTK_BOX(bbox), close_bt, TRUE, TRUE, 0);
gtk_widget_show(close_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 "Close" button
+ * had been selected.
+ */
dlg_set_cancel(main_w, close_bt);
remember_filter_dialog(main_w, filter_dialogs);