aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-search.c
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-07-24 05:46:09 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-07-24 05:46:09 +0800
commit7db908f5f385bfaea6c962eac7fa84145743a5c1 (patch)
treebd355d8f183c3b5b22c9acebc8c1f4deba98f214 /mail/mail-search.c
parentae75558c213056b70bab3e81f608e96691dc33ba (diff)
downloadgsoc2013-evolution-7db908f5f385bfaea6c962eac7fa84145743a5c1.tar
gsoc2013-evolution-7db908f5f385bfaea6c962eac7fa84145743a5c1.tar.gz
gsoc2013-evolution-7db908f5f385bfaea6c962eac7fa84145743a5c1.tar.bz2
gsoc2013-evolution-7db908f5f385bfaea6c962eac7fa84145743a5c1.tar.lz
gsoc2013-evolution-7db908f5f385bfaea6c962eac7fa84145743a5c1.tar.xz
gsoc2013-evolution-7db908f5f385bfaea6c962eac7fa84145743a5c1.tar.zst
gsoc2013-evolution-7db908f5f385bfaea6c962eac7fa84145743a5c1.zip
Carefully check for NULL everywhere, and do the right thing if the message
2001-07-23 Jon Trowbridge <trow@ximian.com> * 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
Diffstat (limited to 'mail/mail-search.c')
-rw-r--r--mail/mail-search.c18
1 files changed, 17 insertions, 1 deletions
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