aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/mail-folder-cache.c18
2 files changed, 23 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index e9132ae068..7f3011dcad 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,14 @@
2001-07-16 Peter Williams <peterw@ximian.com>
+ * mail-folder-cache.c (outbox_folder): prototype outbox_folder so we
+ can check if a folder is it.
+ (make_folder_name): If the folder is the outbox, display the count of
+ total messages as "unsent".
+ (make_folder_status): If the folder is the outbox, display "unsent"
+ instead of "total"
+
+2001-07-16 Peter Williams <peterw@ximian.com>
+
* mail-display.c (mail_display_redisplay): Use our own display_style
member instead of the global setting.
(mail_display_init): Initialize display_style.
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index 8e66866e7a..621a8b873c 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -39,8 +39,6 @@
#define ld(x)
#define d(x)
-/* is args... portable at all? */
-
/* Structures */
typedef enum mail_folder_info_flags {
@@ -92,6 +90,8 @@ static GStaticMutex folders_lock = G_STATIC_MUTEX_INIT;
static GNOME_Evolution_ShellView shell_view = CORBA_OBJECT_NIL;
static FolderBrowser *folder_browser = NULL;
+extern CamelFolder *outbox_folder;
+
/* Private functions */
/* call this with the folders locked */
@@ -139,7 +139,13 @@ make_folder_name (mail_folder_info *mfi)
work = g_string_new (mfi->name);
- if (mfi->flags & MAIL_FIF_UNREAD_VALID && mfi->unread)
+ /* the way the logic is now, an outbox folder simply doesn't have
+ * its unread count displayed. Makes sense to me at the moment. */
+
+ if (mfi->flags & MAIL_FIF_FOLDER_VALID && mfi->folder == outbox_folder) {
+ if (mfi->flags & MAIL_FIF_TOTAL_VALID)
+ g_string_sprintfa (work, " (%d unsent)", mfi->total);
+ } else if (mfi->flags & MAIL_FIF_UNREAD_VALID && mfi->unread)
g_string_sprintfa (work, " (%d)", mfi->unread);
ret = work->str;
@@ -175,7 +181,11 @@ make_folder_status (mail_folder_info *mfi)
if (mfi->flags & MAIL_FIF_TOTAL_VALID) {
if (set_one)
work = g_string_append (work, _(", "));
- g_string_sprintfa (work, _("%d total"), mfi->total);
+
+ if (mfi->flags & MAIL_FIF_FOLDER_VALID && mfi->folder == outbox_folder)
+ g_string_sprintfa (work, _("%d unsent"), mfi->total);
+ else
+ g_string_sprintfa (work, _("%d total"), mfi->total);
}
ret = work->str;