diff options
-rw-r--r-- | mail/em-utils.c | 15 | ||||
-rw-r--r-- | 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); - /* <Highlander>There can be only one.</Highlander> */ - 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); } |