aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-04-22 13:01:15 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-04-22 13:01:15 +0800
commitb44e6e4a87771e5348ca73f4f648c4083278c78a (patch)
treeb9da6271eb467879de0b0e75f8c36849a6656659 /mail
parent0be2584d03e5b40a41d23e68d6ebaed94a1a53e0 (diff)
downloadgsoc2013-evolution-b44e6e4a87771e5348ca73f4f648c4083278c78a.tar
gsoc2013-evolution-b44e6e4a87771e5348ca73f4f648c4083278c78a.tar.gz
gsoc2013-evolution-b44e6e4a87771e5348ca73f4f648c4083278c78a.tar.bz2
gsoc2013-evolution-b44e6e4a87771e5348ca73f4f648c4083278c78a.tar.lz
gsoc2013-evolution-b44e6e4a87771e5348ca73f4f648c4083278c78a.tar.xz
gsoc2013-evolution-b44e6e4a87771e5348ca73f4f648c4083278c78a.tar.zst
gsoc2013-evolution-b44e6e4a87771e5348ca73f4f648c4083278c78a.zip
display selected count instead of unread if we have >1 selected. Also
2004-04-22 Not Zed <NotZed@Ximian.com> * mail-component.c (view_changed_cb): display selected count instead of unread if we have >1 selected. Also don't do special case drafts/sent/outbox stuff if folders are inbox or re-used. svn path=/trunk/; revision=25575
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-component.c30
2 files changed, 33 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 8399808eac..81dfff224a 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2004-04-22 Not Zed <NotZed@Ximian.com>
+
+ * mail-component.c (view_changed_cb): display selected count
+ instead of unread if we have >1 selected. Also don't do special
+ case drafts/sent/outbox stuff if folders are inbox or re-used.
+
2004-04-21 Not Zed <NotZed@Ximian.com>
* em-inline-filter.c (emif_scan): use a better test for non-full
diff --git a/mail/mail-component.c b/mail/mail-component.c
index 2a4d704d0f..0d83da9112 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -475,19 +475,43 @@ view_changed_cb(EMFolderView *emfv, EInfoLabel *el)
else
g_string_append_printf(tmp, _("%d junk"), junked);
} else {
+ int bits = 0;
+ GPtrArray *selected;
+
+ /* This is so that if any of these are
+ * shared/reused, we fallback to the standard
+ * display behaviour */
+
+ selected = message_list_get_selected(emfv->list);
+
if (em_utils_folder_is_drafts(emfv->folder, emfv->folder_uri))
+ bits |= 1;
+ if (em_utils_folder_is_sent(emfv->folder, emfv->folder_uri))
+ bits |= 2;
+ if (em_utils_folder_is_outbox(emfv->folder, emfv->folder_uri))
+ bits |= 4;
+ /* HACK: hardcoded inbox or maildir '.' folder */
+ if (g_ascii_strcasecmp(emfv->folder->full_name, "inbox") == 0
+ || g_ascii_strcasecmp(emfv->folder->full_name, ".") == 0)
+ bits |= 8;
+
+ if (bits == 1)
g_string_append_printf(tmp, _("%d drafts"), visible);
- else if (em_utils_folder_is_sent(emfv->folder, emfv->folder_uri))
+ else if (bits == 2)
g_string_append_printf(tmp, _("%d sent"), visible);
- else if (em_utils_folder_is_outbox(emfv->folder, emfv->folder_uri))
+ else if (bits == 4)
g_string_append_printf(tmp, _("%d unsent"), visible);
else {
if (!emfv->hide_deleted)
visible += deleted;
g_string_append_printf(tmp, _("%d total"), visible);
- if (unread)
+ if (unread && selected->len <=1)
g_string_append_printf(tmp, _(", %d unread"), unread);
}
+
+ if (selected->len > 1)
+ g_string_append_printf(tmp, _(", %d selected"), selected->len);
+ message_list_free_uids(emfv->list, selected);
}
e_info_label_set_info(el, name, tmp->str);