diff options
author | Milan Crha <mcrha@redhat.com> | 2009-10-16 17:32:46 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-10-16 17:32:46 +0800 |
commit | 93040de356b53196e097099f46d9a6ea6718e7e6 (patch) | |
tree | 8e9e45667a00bcbb81dfc613d7f6b806c4bf2131 /mail/mail-folder-cache.c | |
parent | ff885467062cecc9c80ca5441217777ccc5a757e (diff) | |
download | gsoc2013-evolution-93040de356b53196e097099f46d9a6ea6718e7e6.tar.gz gsoc2013-evolution-93040de356b53196e097099f46d9a6ea6718e7e6.tar.zst gsoc2013-evolution-93040de356b53196e097099f46d9a6ea6718e7e6.zip |
Bug #339628 - Non-default Draft folders are Draft folders too
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r-- | mail/mail-folder-cache.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index d19e163001..9bbb3737d2 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -312,26 +312,21 @@ update_1folder(struct _folder_info *mfi, gint new, CamelFolderInfo *info) { struct _folder_update *up; CamelFolder *folder; - CamelFolder *local_drafts; - CamelFolder *local_outbox; - CamelFolder *local_sent; gint unread = -1; gint deleted; - local_drafts = e_mail_local_get_folder (E_MAIL_FOLDER_DRAFTS); - local_outbox = e_mail_local_get_folder (E_MAIL_FOLDER_OUTBOX); - local_sent = e_mail_local_get_folder (E_MAIL_FOLDER_SENT); - folder = mfi->folder; if (folder) { + gboolean is_drafts = FALSE, is_outbox = FALSE; + d(printf("update 1 folder '%s'\n", folder->full_name)); if ((count_trash && (CAMEL_IS_VTRASH_FOLDER (folder))) - || folder == local_drafts - || folder == local_outbox - || (count_sent && folder == local_sent)) { + || (is_drafts = em_utils_folder_is_drafts (folder, info ? info->uri : NULL)) + || (is_outbox = em_utils_folder_is_outbox (folder, info ? info->uri : NULL)) + || (count_sent && em_utils_folder_is_sent (folder, info ? info->uri : NULL))) { d(printf(" total count\n")); unread = camel_folder_get_message_count (folder); - if (folder == local_drafts || folder == local_outbox) { + if (is_drafts || is_outbox) { guint32 junked = 0; if ((deleted = camel_folder_get_deleted_message_count (folder)) > 0) |