aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/mail-component.c5
2 files changed, 11 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 49ab5045e8..f71ba1a4ea 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2008-04-02 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #271863
+
+ * mail-component.c: (view_changed):
+ Do not count deleted junked messages to total number of messages
+ with unchecked "Hide Deleted Messages" option.
+
2008-04-01 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #525508, spotted by Thomas M.
diff --git a/mail/mail-component.c b/mail/mail-component.c
index 5a35245dea..34fcd26dc3 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -518,7 +518,7 @@ view_changed(EMFolderView *emfv, EComponentView *component_view)
if (emfv->folder) {
char *name, *title;
const char *use_name; /* will contain localized name, if necessary */
- guint32 visible, unread, deleted, junked;
+ guint32 visible, unread, deleted, junked, junked_not_deleted;
GPtrArray *selected;
GString *tmp = g_string_new("");
@@ -527,6 +527,7 @@ view_changed(EMFolderView *emfv, EComponentView *component_view)
CAMEL_FOLDER_DELETED, &deleted,
CAMEL_FOLDER_VISIBLE, &visible,
CAMEL_FOLDER_JUNKED, &junked,
+ CAMEL_FOLDER_JUNKED_NOT_DELETED, &junked_not_deleted,
CAMEL_FOLDER_UNREAD, &unread, NULL);
selected = message_list_get_selected(emfv->list);
@@ -552,7 +553,7 @@ view_changed(EMFolderView *emfv, EComponentView *component_view)
/* HACK: hardcoded inbox or maildir '.' folder */
} else {
if (!emfv->hide_deleted)
- visible += deleted;
+ visible += deleted - junked + junked_not_deleted;
if (unread && selected->len <= 1)
g_string_append_printf(tmp, ngettext ("%d unread, ", "%d unread, ", unread), unread);
g_string_append_printf(tmp, ngettext ("%d total", "%d total", visible), visible);