summaryrefslogtreecommitdiff
path: root/gtk/dfilter_expr_dlg.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-02-20 20:14:18 +0000
committerGuy Harris <guy@alum.mit.edu>2001-02-20 20:14:18 +0000
commit16091b24f19b60593eed424b6a0e9c42b24992ba (patch)
tree0beab97ab3e5f3cc2fc53ff0709afb252131cea6 /gtk/dfilter_expr_dlg.c
parent83a7e036fbfab722488d076d36b5fc6f731b3dad (diff)
downloadwireshark-16091b24f19b60593eed424b6a0e9c42b24992ba.tar.gz
Catch the "destroy" signal on the filter-expression-construction dialog,
and, when it's being destroyed, disconnect from the "destroy" signal on the text entry box to which it's attached, so that, when that text entry box is destroyed, we don't try to get rid of the no-longer-extant filter-expression-construction dialog. svn path=/trunk/; revision=3061
Diffstat (limited to 'gtk/dfilter_expr_dlg.c')
-rw-r--r--gtk/dfilter_expr_dlg.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/gtk/dfilter_expr_dlg.c b/gtk/dfilter_expr_dlg.c
index f7db0c274e..858a6e85a1 100644
--- a/gtk/dfilter_expr_dlg.c
+++ b/gtk/dfilter_expr_dlg.c
@@ -7,7 +7,7 @@
* Copyright 2000, Jeffrey C. Foster<jfoste@woodward.com> and
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: dfilter_expr_dlg.c,v 1.17 2001/02/20 20:06:04 guy Exp $
+ * $Id: dfilter_expr_dlg.c,v 1.18 2001/02/20 20:14:18 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -824,6 +824,19 @@ dfilter_expr_dlg_cancel_cb(GtkWidget *w, gpointer parent_w)
gtk_widget_destroy(GTK_WIDGET(parent_w));
}
+static void
+dfilter_expr_dlg_destroy_cb(GtkWidget *w, gpointer filter_te)
+{
+ /*
+ * The dialog box is being destroyed; disconnect from the
+ * "destroy" signal on the text entry box to which we're
+ * attached, as the handler for that signal is supposed
+ * to destroy us, but we're already gone.
+ */
+ gtk_signal_disconnect_by_func(GTK_OBJECT(filter_te),
+ dfilter_expr_dlg_cancel_cb, w);
+}
+
void
dfilter_expr_dlg_new(GtkWidget *filter_te)
{
@@ -1112,6 +1125,14 @@ dfilter_expr_dlg_new(GtkWidget *filter_te)
GTK_SELECTION_BROWSE);
/*
+ * Catch the "destroy" signal on our top-level window, and,
+ * when it's destroyed, disconnect the signal we'll be
+ * connecting below.
+ */
+ gtk_signal_connect(GTK_OBJECT(window), "destroy",
+ GTK_SIGNAL_FUNC(dfilter_expr_dlg_destroy_cb), filter_te);
+
+ /*
* Catch the "destroy" signal on the text entry widget to which
* we're attached; if it's destroyed, we should destroy ourselves
* as well.