aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog12
-rw-r--r--mail/em-folder-tree-model.c14
-rw-r--r--mail/mail-folder-cache.c11
3 files changed, 32 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 25511a491b..84d02a1087 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,15 @@
+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.
+
2004-04-02 Not Zed <NotZed@Ximian.com>
* em-inline-filter.c: do a per-line validation of the uuencoded
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);
}
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)