From 7db908f5f385bfaea6c962eac7fa84145743a5c1 Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Mon, 23 Jul 2001 21:46:09 +0000 Subject: Carefully check for NULL everywhere, and do the right thing if the message 2001-07-23 Jon Trowbridge * mail-search.c (begin_cb): Carefully check for NULL everywhere, and do the right thing if the message we are currently looking at gets expunged. (Bug #4870) svn path=/trunk/; revision=11321 --- mail/ChangeLog | 8 +++++++- mail/mail-search.c | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 20ccbcdbc5..073171617a 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2001-07-23 Jon Trowbridge + + * mail-search.c (begin_cb): Carefully check for NULL everywhere, + and do the right thing if the message we are currently looking + at gets expunged. (Bug #4870) + 2001-07-23 Jason Leach [Bug #5225: No UI way to mark as unimportant] @@ -10,7 +16,7 @@ * mail-callbacks.c (mark_as_unimportant): Simple function that's the callback for these new menu items. - + 2001-07-22 Ettore Perazzoli * component-factory.c (remove_folder): Updated to get a @type diff --git a/mail/mail-search.c b/mail/mail-search.c index ceef9c7437..7cc7a13e52 100644 --- a/mail/mail-search.c +++ b/mail/mail-search.c @@ -164,6 +164,7 @@ static void toggled_fwd_cb (GtkToggleButton *b, MailSearch *ms) { ms->search_forward = gtk_toggle_button_get_active (b); + gtk_html_engine_search_set_forward (ms->mail->html, ms->search_forward); } static void @@ -224,8 +225,23 @@ dialog_clicked_cb (GtkWidget *w, gint button_number, MailSearch *ms) static void begin_cb (ESearchingTokenizer *st, gchar *foo, MailSearch *ms) { + const gchar *subject; + + if (ms && ms->mail && ms->mail->current_message) { + + subject = ms->mail->current_message->subject; + + if (subject == NULL) + subject = _("Untitled Message"); + + } else { + + subject = _("Empty Message"); + + } + gtk_label_set_text (GTK_LABEL (ms->count_label), "0"); - mail_search_set_subject (ms, ms->mail->current_message->subject); + mail_search_set_subject (ms, subject); } static void -- cgit