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/em-folder-tree-model.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/em-folder-tree-model.c')
-rw-r--r-- | mail/em-folder-tree-model.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index 0c1c689ecf..d568dac733 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -460,8 +460,18 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite /* This is duplicated in mail-folder-cache too, should perhaps be functionised */ unread = fi->unread == -1 ? 0 : fi->unread; if (mail_note_get_folder_from_uri(fi->uri, &folder) && folder) { - if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)) - unread = camel_folder_get_message_count(folder); + if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)) { + int total; + + if ((total = camel_folder_get_message_count (folder)) > 0) { + int deleted = camel_folder_get_deleted_message_count (folder); + + if (deleted != -1) + total -= deleted; + } + + unread = total > 0 ? total : 0; + } camel_object_unref(folder); } |