diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-01-21 01:45:07 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-01-21 01:45:07 +0000 |
commit | d6dd1fea0d4e1f6bed1b2334b9dd8639a52bb6eb (patch) | |
tree | 544ea9d4ef93c943bdfc4ea5356a9a7b8b510132 /gtk/filter_prefs.h | |
parent | 873bc5898eedb9f395f8a87080117d8ed6c95891 (diff) |
In the process of destroying a filter editing dialog box, we get a
selection change event on the list of filters. Unfortunately, this can
happen after some other widgets in that dialog box have already been
destroyed - including some of the widgets that such a selection change
event can change.
This sometimes happened when "filter_prefs_delete()" hadn't been called,
so the mechanism we had been using, with a Boolean datum attached to the
dialog box, set in "filter_prefs_delete()" before we actually destroy
the dialog box, wasn't sufficient to keep that from happening.
Attach to the top-level window data items containing pointers to the
widgets changed when a filter is selected from the list, give each of
those widgets their own destroy callbacks, clear the pointer attached to
the top-level widget when the widget is destroyed, and don't do anything
to the widget when a filter is selected from the list if the pointer for
that widget is null, as that means the widget's been destroyed and we
*can't* do anything to it.
Not all filter editing dialogs created on behalf of a "Filter:" button
next to a text entry box should, when you click "OK", activate the text
entry box; if the text entry box is part of a dialog box with multiple
widgets, the user might not have filled in all of the items in that
dialog box, so you shouldn't activate it for them. Add a mechanism by
which, when creating a filter editing dialog box, you can specify
whether the "OK" button should just fill in the text entry box or should
fill it in and also activate it.
svn path=/trunk/; revision=2922
Diffstat (limited to 'gtk/filter_prefs.h')
-rw-r--r-- | gtk/filter_prefs.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gtk/filter_prefs.h b/gtk/filter_prefs.h index 91cc783d0e..369d5f1c99 100644 --- a/gtk/filter_prefs.h +++ b/gtk/filter_prefs.h @@ -3,7 +3,7 @@ * (This used to be a notebook page under "Preferences", hence the * "prefs" in the file name.) * - * $Id: filter_prefs.h,v 1.7 2001/01/02 01:32:21 guy Exp $ + * $Id: filter_prefs.h,v 1.8 2001/01/21 01:45:07 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -28,8 +28,18 @@ #ifndef __FILTER_H__ #define __FILTER_H__ +/* + * Structure giving properties of the filter editing dialog box to be + * created. + */ +typedef struct { + gboolean wants_apply_button; /* if it should have an Apply button */ + gboolean activate_on_ok; /* if parent text widget should be + activated on "Ok" or "Apply" */ +} construct_args_t; + void capture_filter_construct_cb(GtkWidget *w, gpointer user_data); -void display_filter_construct_cb(GtkWidget *w, gpointer wants_apply_button); +void display_filter_construct_cb(GtkWidget *w, gpointer construct_args_ptr); void filter_dialog_cb(GtkWidget *); #define E_FILT_TE_KEY "filter_te" |