aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-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),