aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-06-21 02:36:42 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-06-21 02:40:06 +0800
commit50a5e067d50806371110f54dce77628cbc548ab1 (patch)
tree21970dc6d706e4bf742555d67ccb2880062624c8
parentd057ced4208c21bb2e9a50820092afc7e637279c (diff)
downloadgsoc2013-evolution-50a5e067d50806371110f54dce77628cbc548ab1.tar.gz
gsoc2013-evolution-50a5e067d50806371110f54dce77628cbc548ab1.tar.zst
gsoc2013-evolution-50a5e067d50806371110f54dce77628cbc548ab1.zip
Bug 678393 - Disable Properties for built-in mail stores
-rw-r--r--mail/e-mail-sidebar.c2
-rw-r--r--mail/e-mail-sidebar.h3
-rw-r--r--modules/mail/e-mail-shell-view.c6
3 files changed, 8 insertions, 3 deletions
diff --git a/mail/e-mail-sidebar.c b/mail/e-mail-sidebar.c
index 594dd27830..2831ac0711 100644
--- a/mail/e-mail-sidebar.c
+++ b/mail/e-mail-sidebar.c
@@ -498,6 +498,8 @@ mail_sidebar_check_state (EMailSidebar *sidebar)
state |= E_MAIL_SIDEBAR_FOLDER_IS_TRASH;
if (is_virtual)
state |= E_MAIL_SIDEBAR_FOLDER_IS_VIRTUAL;
+ if (store_is_local || store_is_vfolder)
+ state |= E_MAIL_SIDEBAR_STORE_IS_BUILTIN;
if (CAMEL_IS_SUBSCRIBABLE (store))
state |= E_MAIL_SIDEBAR_STORE_IS_SUBSCRIBABLE;
diff --git a/mail/e-mail-sidebar.h b/mail/e-mail-sidebar.h
index 922e58c8b8..76602c6619 100644
--- a/mail/e-mail-sidebar.h
+++ b/mail/e-mail-sidebar.h
@@ -59,7 +59,8 @@ enum {
E_MAIL_SIDEBAR_FOLDER_IS_STORE = 1 << 4,
E_MAIL_SIDEBAR_FOLDER_IS_TRASH = 1 << 5,
E_MAIL_SIDEBAR_FOLDER_IS_VIRTUAL = 1 << 6,
- E_MAIL_SIDEBAR_STORE_IS_SUBSCRIBABLE = 1 << 7
+ E_MAIL_SIDEBAR_STORE_IS_BUILTIN = 1 << 7,
+ E_MAIL_SIDEBAR_STORE_IS_SUBSCRIBABLE = 1 << 8
};
struct _EMailSidebar {
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c
index 6efc54ba9d..4d91a3dbd1 100644
--- a/modules/mail/e-mail-shell-view.c
+++ b/modules/mail/e-mail-shell-view.c
@@ -835,6 +835,7 @@ mail_shell_view_update_actions (EShellView *shell_view)
gboolean folder_is_virtual;
gboolean folder_has_unread_rec = FALSE;
gboolean folder_tree_and_message_list_agree = TRUE;
+ gboolean store_is_builtin;
gboolean store_is_subscribable;
gboolean any_store_is_subscribable = FALSE;
@@ -873,6 +874,8 @@ mail_shell_view_update_actions (EShellView *shell_view)
(state & E_MAIL_SIDEBAR_FOLDER_IS_TRASH);
folder_is_virtual =
(state & E_MAIL_SIDEBAR_FOLDER_IS_VIRTUAL);
+ store_is_builtin =
+ (state & E_MAIL_SIDEBAR_STORE_IS_BUILTIN);
store_is_subscribable =
(state & E_MAIL_SIDEBAR_STORE_IS_SUBSCRIBABLE);
@@ -972,9 +975,8 @@ mail_shell_view_update_actions (EShellView *shell_view)
sensitive = folder_is_trash;
gtk_action_set_sensitive (action, sensitive);
- /* folder_is_store + folder_is_virtual == "Search Folders" */
action = ACTION (MAIL_ACCOUNT_PROPERTIES);
- sensitive = (store != NULL) && folder_is_store && !folder_is_virtual;
+ sensitive = folder_is_store && !store_is_builtin;
gtk_action_set_sensitive (action, sensitive);
action = ACTION (MAIL_FLUSH_OUTBOX);