aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-02-07 22:07:12 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-02-07 22:32:54 +0800
commit5795e22cb7a67056948f81e1faca2dcecb9333de (patch)
tree759b3a7a16b24d26180d667904c0038ffe4f9908 /modules/mail
parent0972cb0671b13783594ba9ad92c604e27e479152 (diff)
downloadgsoc2013-evolution-5795e22cb7a67056948f81e1faca2dcecb9333de.tar
gsoc2013-evolution-5795e22cb7a67056948f81e1faca2dcecb9333de.tar.gz
gsoc2013-evolution-5795e22cb7a67056948f81e1faca2dcecb9333de.tar.bz2
gsoc2013-evolution-5795e22cb7a67056948f81e1faca2dcecb9333de.tar.lz
gsoc2013-evolution-5795e22cb7a67056948f81e1faca2dcecb9333de.tar.xz
gsoc2013-evolution-5795e22cb7a67056948f81e1faca2dcecb9333de.tar.zst
gsoc2013-evolution-5795e22cb7a67056948f81e1faca2dcecb9333de.zip
Bug 418520 - Disable Folder -> Expunge in virtual folders
Expunging from a virtual folder actually expunges one or more real folders, which the user may not be aware of and can lead to unintended message removal. I feel it's safest to just disable Folder -> Expunge for any virtual folder, be it Junk, Trash, or a Search Folder. Note that File -> Empty Trash is still always enabled.
Diffstat (limited to 'modules/mail')
-rw-r--r--modules/mail/e-mail-shell-view.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c
index afd7501d92..9929d8ae0e 100644
--- a/modules/mail/e-mail-shell-view.c
+++ b/modules/mail/e-mail-shell-view.c
@@ -828,6 +828,7 @@ mail_shell_view_update_actions (EShellView *shell_view)
gboolean folder_is_outbox;
gboolean folder_is_store;
gboolean folder_is_trash;
+ gboolean folder_is_virtual;
gboolean folder_has_unread_rec = FALSE;
gboolean folder_tree_and_message_list_agree = TRUE;
gboolean store_is_subscribable;
@@ -864,6 +865,8 @@ mail_shell_view_update_actions (EShellView *shell_view)
(state & E_MAIL_SIDEBAR_FOLDER_IS_STORE);
folder_is_trash =
(state & E_MAIL_SIDEBAR_FOLDER_IS_TRASH);
+ folder_is_virtual =
+ (state & E_MAIL_SIDEBAR_FOLDER_IS_VIRTUAL);
store_is_subscribable =
(state & E_MAIL_SIDEBAR_STORE_IS_SUBSCRIBABLE);
@@ -962,7 +965,7 @@ mail_shell_view_update_actions (EShellView *shell_view)
gtk_action_set_sensitive (action, sensitive);
action = ACTION (MAIL_FOLDER_EXPUNGE);
- sensitive = !folder_is_store && uri != NULL;
+ sensitive = !folder_is_store && !folder_is_virtual && uri != NULL;
gtk_action_set_sensitive (action, sensitive);
action = ACTION (MAIL_FOLDER_MOVE);