From 5402231287a5ec4b4a3d7b86b20522732af5e783 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 16 Jan 2004 15:59:56 +0000 Subject: Move 'message_list->folder = folder;' out of the uri compare if-block and 2004-01-16 Jeffrey Stedfast * message-list.c (message_list_set_folder): Move 'message_list->folder = folder;' out of the uri compare if-block and move it into the if-block that tests that folder != NULL. (regen_list_regen): Abort if the regen folder is not the same as the ml->folder. svn path=/trunk/; revision=24273 --- mail/ChangeLog | 12 ++++++++---- mail/message-list.c | 17 +++++++++-------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index a73e8cc722..08478f7f29 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2004-01-16 Jeffrey Stedfast + + * message-list.c (message_list_set_folder): Move + 'message_list->folder = folder;' out of the uri compare if-block + and move it into the if-block that tests that folder != NULL. + (regen_list_regen): Abort if the regen folder is not the same as + the ml->folder. + 2004-01-16 Not Zed * mail-folder-cache.c (storeinfo_find_folder_info): change this to @@ -26,10 +34,6 @@ * em-migrate.c (emm_setup_initial): initial implementation of startup setup. - (cp): Fix the test, we want exists AND size>0, not exists OR - size>0. - (cp): Fix the open, we can't use O_EXCL with empty, but present - files. Another hack fix for #52880. ** See bug #52896. diff --git a/mail/message-list.c b/mail/message-list.c index a1960d9293..8130f20e8d 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -1167,17 +1167,15 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data) goto find_colour; } } else if (msg_info->flags & CAMEL_MESSAGE_FLAGGED) { - /* FIXME: extract from the xpm somehow. */ + /* FIXME: extract from the important.xpm somehow. */ colour = "#A7453E"; } else if ((due_by && *due_by) && !(completed && *completed)) { time_t now = time (NULL); time_t target_date; target_date = camel_header_decode_date (due_by, NULL); - if (now >= target_date) { - /* FIXME: extract from the xpm somehow. */ + if (now >= target_date) colour = "#A7453E"; - } } } return (void *) colour; @@ -2538,7 +2536,7 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c while (l) { struct _mail_msg *mm = l->data; - + if (mm->cancel) camel_operation_cancel(mm->cancel); l = l->next; @@ -2564,7 +2562,6 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c if (message_list->folder_uri != uri) { g_free(message_list->folder_uri); message_list->folder_uri = g_strdup(uri); - message_list->folder = folder; } if (message_list->cursor_uid) { @@ -2574,6 +2571,9 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c } if (folder) { + camel_object_ref (folder); + message_list->folder = folder; + /* Setup the strikeout effect for non-trash folders */ if (!(folder->folder_flags & CAMEL_FOLDER_IS_TRASH)) { ECell *cell; @@ -2602,8 +2602,6 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c camel_object_hook_event (folder, "message_changed", message_changed, message_list); - camel_object_ref (folder); - gconf = mail_config_get_gconf_client (); hide_deleted = !gconf_client_get_bool (gconf, "/apps/evolution/mail/display/show_deleted", NULL); message_list->hidedeleted = hide_deleted && !(folder->folder_flags & CAMEL_FOLDER_IS_TRASH); @@ -3099,6 +3097,9 @@ regen_list_regen (struct _mail_msg *mm) CamelMessageInfo *info; int i; + if (m->folder != m->ml->folder) + return; + /* if we have hidedeleted on, use a search to find it out, merge with existing search if set */ if (!camel_folder_has_search_capability(m->folder)) { /* if we have no search capability, dont let search or hide deleted work */ -- cgit v1.2.3