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
This commit is contained in:
Larry Ewing
2001-08-24 02:59:34 +00:00
committed by Larry Ewing
parent 755b78ae71
commit 0d3ec1ae39
2 changed files with 23 additions and 5 deletions

View File

@ -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

View File

@ -169,6 +169,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)
{
@ -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),