aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-02-23 05:54:27 +0000
committerGuy Harris <guy@alum.mit.edu>2001-02-23 05:54:27 +0000
commit52df3c73ecc596816a9769c3c81ffa04ef8ee0fb (patch)
tree2d9cd16f0149d10136f5cbec54ee5abef97de25a /gtk
parent99ec31082e604e75d9a490c20ed036c7802f4825 (diff)
The text entry box that a filter construction dialog manipulates is
always attached to the dialog as the E_FILT_FILTER_TE_KEY data, but only sometimes attached as the E_FILT_TE_KEY data. Get rid of E_FILT_TE_KEY completely, as it's redundant, and use only E_FILT_FILTER_TE_KEY; this keeps us from crashing as a result of trying to manipulate the widget referred to by E_FILT_TE_KEY if E_FILT_TE_KEY hasn't been set to refer to any widget. svn path=/trunk/; revision=3067
Diffstat (limited to 'gtk')
-rw-r--r--gtk/filter_prefs.c10
-rw-r--r--gtk/filter_prefs.h3
2 files changed, 6 insertions, 7 deletions
diff --git a/gtk/filter_prefs.c b/gtk/filter_prefs.c
index d4ffa28ea3..2078e9dd3e 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.28 2001/02/20 20:25:08 guy Exp $
+ * $Id: filter_prefs.c,v 1.29 2001/02/23 05:54:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -532,6 +532,7 @@ filter_dialog_new(GtkWidget *caller, GtkWidget *parent_filter_te,
filter_te = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(bottom_hb), filter_te, TRUE, TRUE, 3);
gtk_object_set_data(GTK_OBJECT(main_w), E_FILT_FILTER_TE_KEY, filter_te);
+
gtk_signal_connect(GTK_OBJECT(filter_te), "destroy",
GTK_SIGNAL_FUNC(filter_filter_te_destroy_cb), NULL);
gtk_widget_show(filter_te);
@@ -563,8 +564,6 @@ filter_dialog_new(GtkWidget *caller, GtkWidget *parent_filter_te,
GTK_SIGNAL_FUNC(filter_dlg_ok_cb), NULL);
GTK_WIDGET_SET_FLAGS(ok_bt, GTK_CAN_DEFAULT);
gtk_box_pack_start(GTK_BOX(bbox), ok_bt, TRUE, TRUE, 0);
- gtk_object_set_data(GTK_OBJECT(main_w), E_FILT_TE_KEY,
- filter_te);
gtk_widget_grab_default(ok_bt);
gtk_widget_show(ok_bt);
@@ -692,7 +691,7 @@ filter_apply(GtkWidget *main_w)
* supposed to do so.
*/
filter_te = gtk_object_get_data(GTK_OBJECT(main_w),
- E_FILT_TE_KEY);
+ E_FILT_FILTER_TE_KEY);
filter_string = gtk_entry_get_text(GTK_ENTRY(filter_te));
gtk_entry_set_text(GTK_ENTRY(parent_filter_te), filter_string);
if (construct_args->activate_on_ok) {
@@ -1106,7 +1105,8 @@ filter_expr_cb(GtkWidget *w, gpointer main_w_arg)
GtkWidget *main_w = GTK_WIDGET(main_w_arg);
GtkWidget *filter_te;
- filter_te = gtk_object_get_data(GTK_OBJECT(main_w), E_FILT_TE_KEY);
+ filter_te = gtk_object_get_data(GTK_OBJECT(main_w),
+ E_FILT_FILTER_TE_KEY);
dfilter_expr_dlg_new(filter_te);
}
diff --git a/gtk/filter_prefs.h b/gtk/filter_prefs.h
index db6e59d240..b6b478c343 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.10 2001/01/28 09:13:10 guy Exp $
+ * $Id: filter_prefs.h,v 1.11 2001/02/23 05:54:27 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -44,7 +44,6 @@ void display_filter_construct_cb(GtkWidget *w, gpointer construct_args_ptr);
void cfilter_dialog_cb(GtkWidget *w);
void dfilter_dialog_cb(GtkWidget *w);
-#define E_FILT_TE_KEY "filter_te"
#define E_FILT_TE_PTR_KEY "filter_te_ptr"
#define E_FILT_CALLER_PTR_KEY "filter_caller_ptr"
#define E_FILT_DIALOG_PTR_KEY "filter_dialog_ptr"