Make the display options dialog box use the new utilities to make the

Esc key cancel the dialog box.

svn path=/trunk/; revision=1914
This commit is contained in:
Guy Harris 2000-05-08 01:23:16 +00:00
parent 3d8fa758b5
commit e701346096
1 changed files with 7 additions and 1 deletions

View File

@ -1,7 +1,7 @@
/* display_opts.c
* Routines for packet display windows
*
* $Id: display_opts.c,v 1.3 2000/05/08 01:11:46 guy Exp $
* $Id: display_opts.c,v 1.4 2000/05/08 01:23:16 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -62,6 +62,7 @@
#include "packet.h"
#include "file.h"
#include "display_opts.h"
#include "dlg_utils.h"
extern capture_file cf;
extern GtkWidget *packet_list;
@ -189,6 +190,11 @@ display_opt_cb(GtkWidget *w, gpointer d) {
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(display_opt_w, cancel_bt);
display_opt_window_active = TRUE;
gtk_widget_show(display_opt_w);
}