aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Ewing <lewing@ximian.com>2001-08-24 10:59:34 +0800
committerLarry Ewing <lewing@src.gnome.org>2001-08-24 10:59:34 +0800
commit0d3ec1ae39ce2a93d77d266a257b2b9b6048a8a5 (patch)
treed2328248b6f6555d216c7b6172158a398e0d43df
parent755b78ae71f388496eeb24fc465170f066b06385 (diff)
downloadgsoc2013-evolution-0d3ec1ae39ce2a93d77d266a257b2b9b6048a8a5.tar
gsoc2013-evolution-0d3ec1ae39ce2a93d77d266a257b2b9b6048a8a5.tar.gz
gsoc2013-evolution-0d3ec1ae39ce2a93d77d266a257b2b9b6048a8a5.tar.bz2
gsoc2013-evolution-0d3ec1ae39ce2a93d77d266a257b2b9b6048a8a5.tar.lz
gsoc2013-evolution-0d3ec1ae39ce2a93d77d266a257b2b9b6048a8a5.tar.xz
gsoc2013-evolution-0d3ec1ae39ce2a93d77d266a257b2b9b6048a8a5.tar.zst
gsoc2013-evolution-0d3ec1ae39ce2a93d77d266a257b2b9b6048a8a5.zip
attach to the destroy handler to reset the tokenizer. (dialog_destroy_cb):
2001-08-23 Larry Ewing <lewing@ximian.com> * mail-search.c (mail_search_construct): attach to the destroy handler to reset the tokenizer. (dialog_destroy_cb): reset the tokenizer here so that destroying the dialog with the window manager still clears the hilighted items. svn path=/trunk/; revision=12431
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/mail-search.c20
2 files changed, 23 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 653943135f..5fee79adc6 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2001-08-23 Larry Ewing <lewing@ximian.com>
+
+ * mail-search.c (mail_search_construct): attach to the destroy
+ handler to reset the tokenizer.
+ (dialog_destroy_cb): reset the tokenizer here so that destroying
+ the dialog with the window manager still clears the hilighted
+ items.
+
2001-08-23 Peter Williams <peterw@ximian.com>
* mail-account-gui.c (mail_account_gui_save): Eek, let the user create
diff --git a/mail/mail-search.c b/mail/mail-search.c
index 682adaf67d..2513804348 100644
--- a/mail/mail-search.c
+++ b/mail/mail-search.c
@@ -170,6 +170,15 @@ toggled_fwd_cb (GtkToggleButton *b, MailSearch *ms)
#endif
static void
+dialog_destroy_cb (GtkWidget *w, MailSearch *ms)
+{
+ ESearchingTokenizer *st = mail_search_tokenizer (ms);
+
+ e_searching_tokenizer_set_primary_search_string (st, NULL);
+ mail_search_redisplay_message (ms);
+}
+
+static void
dialog_clicked_cb (GtkWidget *w, gint button_number, MailSearch *ms)
{
ESearchingTokenizer *st = mail_search_tokenizer (ms);
@@ -215,12 +224,7 @@ dialog_clicked_cb (GtkWidget *w, gint button_number, MailSearch *ms)
g_free (search_text);
} else if (button_number == 1) { /* "Close" */
-
- e_searching_tokenizer_set_primary_search_string (st, NULL);
- mail_search_redisplay_message (ms);
-
gtk_widget_destroy (w);
-
}
}
@@ -392,6 +396,12 @@ mail_search_construct (MailSearch *ms, MailDisplay *mail)
"clicked",
GTK_SIGNAL_FUNC (dialog_clicked_cb),
ms);
+
+ gtk_signal_connect_object (GTK_OBJECT (ms),
+ "destroy",
+ GTK_SIGNAL_FUNC (dialog_destroy_cb),
+ ms);
+
gtk_signal_connect_object (GTK_OBJECT (ms->mail),
"destroy",
GTK_SIGNAL_FUNC (gtk_widget_destroy),