aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/capture_dlg.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-05-08 07:13:40 +0000
committerGuy Harris <guy@alum.mit.edu>2000-05-08 07:13:40 +0000
commit9bb3a841e326d69d6423bfa405934c5302cb4c82 (patch)
tree163427f5cecffc9f5faaac04dbbb46eaf3e764a2 /gtk/capture_dlg.c
parentbe87df37bf414faae679911fab48351be8c9d057 (diff)
Catch the ESC key in the file selection dialog boxes popped up for
"File->Open", "File->Save As", and the "File:" buttons in the Capture Preferences and Print dialog boxes, and make it cancel the file selection dialog box. svn path=/trunk/; revision=1921
Diffstat (limited to 'gtk/capture_dlg.c')
-rw-r--r--gtk/capture_dlg.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c
index b172c57c32..0fc3094bc6 100644
--- a/gtk/capture_dlg.c
+++ b/gtk/capture_dlg.c
@@ -1,7 +1,7 @@
/* capture_dlg.c
* Routines for packet capture windows
*
- * $Id: capture_dlg.c,v 1.24 2000/05/08 05:51:36 guy Exp $
+ * $Id: capture_dlg.c,v 1.25 2000/05/08 07:13:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -374,6 +374,11 @@ capture_prep_file_cb(GtkWidget *w, gpointer file_te)
/* Connect the cancel_button to destroy the widget */
gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION(fs)->cancel_button),
"clicked", (GtkSignalFunc) cap_prep_fs_cancel_cb, fs);
+
+ /* 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(fs, GTK_FILE_SELECTION(fs)->cancel_button);
gtk_widget_show(fs);
}