From a68b5681353d9999b208cdbada9b40586eb09c18 Mon Sep 17 00:00:00 2001 From: 0 Date: Fri, 21 Sep 2001 00:56:49 +0000 Subject: Update the status bar here, assuming we've just been activated. 2001-09-20 * folder-browser.c (folder_browser_set_shell_view): Update the status bar here, assuming we've just been activated. * mail-ops.c (add_vtrash_info): Scan whole list, rather than missing the last one. Also dont assume its always the last, otherwise we could lose following folders. * mail-vfolder.c (all): d(x) out debug printfs * mail-folder-cache.c (update_1folder): If its a vtrash folder, or the outbox_folder, and we have a folder, then make the 'count' the total message count, not unread messages count. svn path=/trunk/; revision=13036 --- mail/mail-folder-cache.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'mail/mail-folder-cache.c') diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index c6e361746f..520cdc4afb 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -35,12 +35,13 @@ #include #include #include +#include #include "mail-mt.h" #include "mail-folder-cache.h" #include "mail-ops.h" -#define d(x) +#define d(x) /* note that many things are effectively serialised by having them run in the main loop thread which they need to do because of corba/gtk calls */ @@ -75,14 +76,18 @@ update_1folder(struct _folder_info *mfi, CamelFolderInfo *info) CamelFolder *folder; int unread; CORBA_Environment ev; + extern CamelFolder *outbox_folder; si = mfi->store_info; LOCK(info_lock); folder = mfi->folder; - if (folder) - unread = camel_folder_get_unread_message_count(folder); - else if (info) + if (folder) { + if (CAMEL_IS_VTRASH_FOLDER(folder) || folder == outbox_folder) + unread = camel_folder_get_message_count(folder); + else + unread = camel_folder_get_unread_message_count(folder); + } else if (info) unread = info->unread_message_count; else unread = -1; @@ -170,7 +175,7 @@ real_note_folder(CamelFolder *folder, void *event_data, void *data) si = g_hash_table_lookup(stores, store); UNLOCK(info_lock); if (si == NULL) { - g_warning("Adding a folder `%s' to a store which hasn't been added yet?\n", folder->full_name); + g_warning("Adding a folder `%s' to a store %p which hasn't been added yet?\n", folder->full_name, store); camel_object_unref((CamelObject *)folder); return; } -- cgit v1.2.3