[evolution] Bug #596824 - evolution hangs on start up
- From: Milan Crha <mcrha src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution] Bug #596824 - evolution hangs on start up
- Date: Wed, 7 Oct 2009 11:09:13 +0000 (UTC)
commit 54de40109d1b90653d611dea99bae7a9d689be63
Author: Milan Crha <mcrha redhat com>
Date: Wed Oct 7 13:08:32 2009 +0200
Bug #596824 - evolution hangs on start up
mail/em-utils.c | 11 ++++++++++-
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 4ee9110..76148f7 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 3db9bd6..fcc6805 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]