diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-04-03 03:10:38 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-04-03 03:10:38 +0800 |
commit | a3eea7e8857928541717df562ab98017e23ecb0d (patch) | |
tree | 9d65da02847c6521262a974ac8585dc4404aab39 /mail/mail-folder-cache.c | |
parent | d0037c59a13870c6650e8a2fd490d2fabf3479af (diff) | |
download | gsoc2013-evolution-a3eea7e8857928541717df562ab98017e23ecb0d.tar.gz gsoc2013-evolution-a3eea7e8857928541717df562ab98017e23ecb0d.tar.zst gsoc2013-evolution-a3eea7e8857928541717df562ab98017e23ecb0d.zip |
Fixes bug #37416
2004-04-02 Jeffrey Stedfast <fejj@ximian.com>
Fixes bug #37416
* mail-folder-cache.c (update_1folder): Same as below. Also add
vJunk fodlers to the list of folders that we display the total
count for (as discussed on the mailing lists).
* em-folder-tree-model.c (em_folder_tree_model_set_folder_info):
Use 'total - deleted' as the count for Outbox rather than just the
total count.
svn path=/trunk/; revision=25305
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r-- | mail/mail-folder-cache.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index a17fecc99e..e9bbee1c93 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -329,17 +329,22 @@ update_1folder(struct _folder_info *mfi, int new, CamelFolderInfo *info) struct _folder_update *up; CamelFolder *folder; int unread = -1; - + int deleted; + si = mfi->store_info; folder = mfi->folder; if (folder) { d(printf("update 1 folder '%s'\n", folder->full_name)); - if ((count_trash && CAMEL_IS_VTRASH_FOLDER (folder)) + if ((count_trash && (CAMEL_IS_VTRASH_FOLDER (folder) || CAMEL_IS_VJUNK_FOLDER (folder))) || folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX) || (count_sent && folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT))) { d(printf(" total count\n")); - unread = camel_folder_get_message_count(folder); + unread = camel_folder_get_message_count (folder); + if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)) { + if ((deleted = camel_folder_get_deleted_message_count (folder)) > 0) + unread -= deleted; + } } else { d(printf(" unread count\n")); if (info) |