diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-05-08 07:58:20 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-05-08 07:58:20 +0000 |
commit | 740bb555218c38f90f5880fd3f47d478c89240fe (patch) | |
tree | 7926feafe0447d63567a1872abf76ad003ae2999 /gtk/prefs_dlg.c | |
parent | 158df5470a212e3b08ade72c19551c9812ea0cfa (diff) |
Make the "Preferences" dialog box use the new utilities to make the Esc
key cancel the dialog box.
svn path=/trunk/; revision=1923
Diffstat (limited to 'gtk/prefs_dlg.c')
-rw-r--r-- | gtk/prefs_dlg.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/prefs_dlg.c b/gtk/prefs_dlg.c index 6bf41e618c..33b7684d8f 100644 --- a/gtk/prefs_dlg.c +++ b/gtk/prefs_dlg.c @@ -1,7 +1,7 @@ /* prefs_dlg.c * Routines for handling preferences * - * $Id: prefs_dlg.c,v 1.10 2000/05/08 07:54:53 guy Exp $ + * $Id: prefs_dlg.c,v 1.11 2000/05/08 07:58:20 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -56,6 +56,7 @@ #include "gui_prefs.h" #include "util.h" #include "ui_util.h" +#include "dlg_utils.h" #include "simple_dialog.h" static void prefs_main_ok_cb(GtkWidget *, gpointer); @@ -170,6 +171,11 @@ prefs_cb(GtkWidget *w, gpointer sp) { gtk_box_pack_start (GTK_BOX (bbox), cancel_bt, TRUE, TRUE, 0); gtk_widget_show(cancel_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 + been selected. */ + dlg_set_cancel(prefs_w, cancel_bt); + gtk_widget_show(prefs_w); } |