aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
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);