aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
author3 <NotZed@Ximian.com>2001-10-04 02:18:02 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-04 02:18:02 +0800
commit636b05ecb88932f28ef2d1829da2b40ebcfb6253 (patch)
treea95913f0281fb644fea0fa07c5b37a6f869d85e5 /mail
parent967083749da817df0ea296343528361c3564a798 (diff)
downloadgsoc2013-evolution-636b05ecb88932f28ef2d1829da2b40ebcfb6253.tar
gsoc2013-evolution-636b05ecb88932f28ef2d1829da2b40ebcfb6253.tar.gz
gsoc2013-evolution-636b05ecb88932f28ef2d1829da2b40ebcfb6253.tar.bz2
gsoc2013-evolution-636b05ecb88932f28ef2d1829da2b40ebcfb6253.tar.lz
gsoc2013-evolution-636b05ecb88932f28ef2d1829da2b40ebcfb6253.tar.xz
gsoc2013-evolution-636b05ecb88932f28ef2d1829da2b40ebcfb6253.tar.zst
gsoc2013-evolution-636b05ecb88932f28ef2d1829da2b40ebcfb6253.zip
If we have hide deleted set, then dont count deleted messages in the
2001-10-03 <NotZed@Ximian.com> * folder-browser.c (update_status_bar): If we have hide deleted set, then dont count deleted messages in the 'total' messages count. Fixes #6591. svn path=/trunk/; revision=13381
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/folder-browser.c20
2 files changed, 23 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 752be19887..59a8661ab1 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,9 @@
2001-10-03 <NotZed@Ximian.com>
+ * folder-browser.c (update_status_bar): If we have hide deleted
+ set, then dont count deleted messages in the 'total' messages
+ count. Fixes #6591.
+
* mail-ops.c (add_vtrash_info): If we have a fragment, override
that, rather than the path. Fixes #5251.
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 29509578ec..076c29104c 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -742,7 +742,25 @@ update_status_bar(FolderBrowser *fb)
g_string_append(work, _(", "));
g_string_sprintfa(work, _("%d selected"), tmp);
}
- tmp = camel_folder_get_message_count(fb->folder);
+ if (!fb->message_list->hidedeleted || !camel_folder_has_summary_capability(fb->folder)) {
+ tmp = camel_folder_get_message_count(fb->folder);
+ } else {
+ GPtrArray *sum = camel_folder_get_summary(fb->folder);
+ int i;
+
+ if (sum) {
+ tmp = 0;
+ for (i=0;i<sum->len;i++) {
+ CamelMessageInfo *info = sum->pdata[i];
+
+ if ((info->flags & CAMEL_MESSAGE_DELETED) == 0)
+ tmp++;
+ }
+ camel_folder_free_summary(fb->folder, sum);
+ } else {
+ tmp = camel_folder_get_message_count(fb->folder);
+ }
+ }
g_string_append(work, _(", "));
if (fb->folder == outbox_folder)
g_string_sprintfa(work, _("%d unsent"), tmp);