diff options
author | 0 <NotZed@Ximian.com> | 2001-09-21 08:56:49 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-09-21 08:56:49 +0800 |
commit | a68b5681353d9999b208cdbada9b40586eb09c18 (patch) | |
tree | 71cc4eae2909937c92ce902c2c1571e95eb58565 /mail/mail-folder-cache.c | |
parent | 5de6e2a14b9d3e4fc3260cfa195921d020249a22 (diff) | |
download | gsoc2013-evolution-a68b5681353d9999b208cdbada9b40586eb09c18.tar.gz gsoc2013-evolution-a68b5681353d9999b208cdbada9b40586eb09c18.tar.zst gsoc2013-evolution-a68b5681353d9999b208cdbada9b40586eb09c18.zip |
Update the status bar here, assuming we've just been activated.
2001-09-20 <NotZed@Ximian.com>
* 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
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r-- | mail/mail-folder-cache.c | 15 |
1 files changed, 10 insertions, 5 deletions
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 <bonobo/bonobo-exception.h> #include <camel/camel-store.h> #include <camel/camel-folder.h> +#include <camel/camel-vtrash-folder.h> #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; } |