aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-folder-cache.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2007-11-05 19:33:47 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-11-05 19:33:47 +0800
commitaf8315fae1717faa91c26a3051b8b6f07f95062c (patch)
treeb1c3bf5d5771336a405fed0c3bfe7b8368c27386 /mail/mail-folder-cache.c
parent65409dae98a7812c1b4c547aabf707ac1f43da2f (diff)
downloadgsoc2013-evolution-af8315fae1717faa91c26a3051b8b6f07f95062c.tar.gz
gsoc2013-evolution-af8315fae1717faa91c26a3051b8b6f07f95062c.tar.zst
gsoc2013-evolution-af8315fae1717faa91c26a3051b8b6f07f95062c.zip
** Fix for bug #488298
2007-11-05 Milan Crha <mcrha@redhat.com> ** Fix for bug #488298 * em-folder-view.c: (EMFolderViewEnable emfv_enable_map[]): Disable "MessageMarkAsNotJunk" if requested by context. * mail-folder-cache.c: (update_1folder): Do not count junked messages into "new" messages in drafts and out box. * em-popup.c: (em_popup_target_new_select): Disable "MarkAsJunk" and "MarnAsNotJunk" in drafts and out box. svn path=/trunk/; revision=34502
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r--mail/mail-folder-cache.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index bbe1f902f6..46e9446566 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -360,8 +360,15 @@ update_1folder(struct _folder_info *mfi, int new, CamelFolderInfo *info)
unread = camel_folder_get_message_count (folder);
if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)
|| folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS)) {
+ guint32 junked = 0;
+
if ((deleted = camel_folder_get_deleted_message_count (folder)) > 0)
unread -= deleted;
+
+ camel_object_get (folder, NULL, CAMEL_FOLDER_JUNKED, &junked, NULL);
+ if (junked > 0)
+ unread -= junked;
+
}
} else {
d(printf(" unread count\n"));