diff options
author | Milan Crha <mcrha@redhat.com> | 2009-10-07 19:08:32 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-10-07 19:08:32 +0800 |
commit | 54de40109d1b90653d611dea99bae7a9d689be63 (patch) | |
tree | 7041c0479c4a62e08a4ed6f2064a66c8c7bbf622 | |
parent | c01df5acc66b878c5c46a0b68f9dc959526d7247 (diff) | |
download | gsoc2013-evolution-54de40109d1b90653d611dea99bae7a9d689be63.tar.gz gsoc2013-evolution-54de40109d1b90653d611dea99bae7a9d689be63.tar.zst gsoc2013-evolution-54de40109d1b90653d611dea99bae7a9d689be63.zip |
Bug #596824 - evolution hangs on start up
-rw-r--r-- | mail/em-utils.c | 11 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-sidebar.c | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c index 4ee9110ae5..76148f70ec 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -1413,12 +1413,21 @@ gboolean em_utils_folder_is_outbox(CamelFolder *folder, const gchar *uri) { CamelFolder *local_outbox_folder; + const gchar *local_outbox_uri; local_outbox_folder = e_mail_local_get_folder (E_MAIL_FOLDER_OUTBOX); /* <Highlander>There can be only one.</Highlander> */ - return folder == local_outbox_folder; + if (folder && folder == local_outbox_folder) + return TRUE; + + if (!uri || !local_outbox_folder) + 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); } /** diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c index 3db9bd674e..fcc6805514 100644 --- a/modules/mail/e-mail-shell-sidebar.c +++ b/modules/mail/e-mail-shell-sidebar.c @@ -501,7 +501,6 @@ mail_shell_sidebar_check_state (EShellSidebar *shell_sidebar) GtkTreeView *tree_view; GtkTreeModel *model; GtkTreeIter iter; - CamelFolder *folder; CamelStore *local_store; CamelStore *store; gchar *full_name; @@ -550,8 +549,7 @@ mail_shell_sidebar_check_state (EShellSidebar *shell_sidebar) (strcmp (full_name, "Templates") != 0); if (!(folder_flags & CAMEL_FOLDER_HAS_BEEN_DELETED)) { - folder = em_folder_tree_get_selected_folder (folder_tree); - is_outbox = em_utils_folder_is_outbox (folder, NULL); + is_outbox = em_utils_folder_is_outbox (NULL, uri); } can_delete &= !(folder_flags & CAMEL_FOLDER_SYSTEM); } |