From 2b7aa4a797fc0545e9774a42fdbd6afae5271c6d Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 28 Oct 2009 18:46:41 -0400 Subject: Bug 599896 - Flush outbox option is missing This also reverts commit f5165c618ae2defb310a0ed4eab06dac7346a2b0. --- mail/em-utils.c | 15 ++++++++------- modules/mail/e-mail-shell-sidebar.c | 4 +--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/mail/em-utils.c b/mail/em-utils.c index 2154c62e57..ec1b030f77 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -1415,21 +1415,22 @@ gboolean em_utils_folder_is_outbox(CamelFolder *folder, const gchar *uri) { CamelFolder *local_outbox_folder; - const gchar *local_outbox_uri; + const gchar *local_outbox_folder_uri; local_outbox_folder = e_mail_local_get_folder (E_MAIL_FOLDER_OUTBOX); + local_outbox_folder_uri = + e_mail_local_get_folder_uri (E_MAIL_FOLDER_OUTBOX); - /* There can be only one. */ - if (folder && folder == local_outbox_folder) + if (folder == local_outbox_folder) return TRUE; - if (!uri || !local_outbox_folder) + if (uri == NULL) return FALSE; - local_outbox_uri = e_mail_local_get_folder_uri (E_MAIL_FOLDER_OUTBOX); - - return camel_store_folder_uri_equal (local_outbox_folder->parent_store, local_outbox_uri, uri); + return camel_store_folder_uri_equal ( + local_outbox_folder->parent_store, + local_outbox_folder_uri, uri); } /** diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c index fcc6805514..dd802fc98c 100644 --- a/modules/mail/e-mail-shell-sidebar.c +++ b/modules/mail/e-mail-shell-sidebar.c @@ -548,9 +548,7 @@ mail_shell_sidebar_check_state (EShellSidebar *shell_sidebar) (strcmp (full_name, "Sent") != 0) && (strcmp (full_name, "Templates") != 0); - if (!(folder_flags & CAMEL_FOLDER_HAS_BEEN_DELETED)) { - is_outbox = em_utils_folder_is_outbox (NULL, uri); - } + is_outbox = em_utils_folder_is_outbox (NULL, uri); can_delete &= !(folder_flags & CAMEL_FOLDER_SYSTEM); } -- cgit v1.2.3