aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-07-04 08:56:45 +0800
committerDan Winship <danw@src.gnome.org>2000-07-04 08:56:45 +0800
commit7ad9e599926815d42e88dc2a9a9037fc860d143c (patch)
treec916504956411e0decadac84f9bc06e83d18bd9e /mail/message-list.c
parent323c4f2062fce5c4d12210bfdf013ec3b058d6df (diff)
downloadgsoc2013-evolution-7ad9e599926815d42e88dc2a9a9037fc860d143c.tar.gz
gsoc2013-evolution-7ad9e599926815d42e88dc2a9a9037fc860d143c.tar.zst
gsoc2013-evolution-7ad9e599926815d42e88dc2a9a9037fc860d143c.zip
call mail_display_set_message with NULL if the message we tried to select
* message-list.c (select_msg): call mail_display_set_message with NULL if the message we tried to select doesn't exist (probably meaning we tried to selecte the first message and the folder is empty.) * mail-display.c (mail_display_set_message): deal with NULL as an input (meaning "undisplay previous message and display nothing"). svn path=/trunk/; revision=3879
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index eac111e285..9b34ba7ddc 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -145,12 +145,13 @@ static void
select_msg (MessageList *message_list, gint row)
{
CamelException ex;
- CamelMimeMessage *message = NULL;
+ CamelMimeMessage *message;
CamelMessageInfo *msg_info;
+ MailDisplay *md = message_list->parent_folder_browser->mail_display;
camel_exception_init (&ex);
- msg_info = get_message_info(message_list, row);
+ msg_info = get_message_info (message_list, row);
if (msg_info) {
message = camel_folder_get_message (message_list->folder,
msg_info->uid, &ex);
@@ -159,19 +160,17 @@ select_msg (MessageList *message_list, gint row)
ex.desc?ex.desc:"unknown_reason");
return;
}
- }
- if (message) {
if (message_list->seen_id)
gtk_timeout_remove (message_list->seen_id);
- mail_display_set_message (message_list->parent_folder_browser->mail_display,
- CAMEL_MEDIUM (message));
+ mail_display_set_message (md, CAMEL_MEDIUM (message));
gtk_object_unref (GTK_OBJECT (message));
message_list->seen_id =
gtk_timeout_add (1500, mark_msg_seen, message_list);
- }
+ } else
+ mail_display_set_message (md, NULL);
}
/*