aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-reader.c
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2010-05-19 22:22:23 +0800
committerMichael Meeks <michael.meeks@novell.com>2010-05-19 22:22:23 +0800
commit9a718fdc54a11ffc2dfe90a1c03d832fe151c2e1 (patch)
treee4815398dbd17e1b87f8bf220b106e5a017e1179 /mail/e-mail-reader.c
parent2566a8549d7fd878226aeb9269f2d5871a5eddc2 (diff)
parentea1a5fca456b891f8bb9ab248ad65651b66b54b2 (diff)
downloadgsoc2013-evolution-9a718fdc54a11ffc2dfe90a1c03d832fe151c2e1.tar
gsoc2013-evolution-9a718fdc54a11ffc2dfe90a1c03d832fe151c2e1.tar.gz
gsoc2013-evolution-9a718fdc54a11ffc2dfe90a1c03d832fe151c2e1.tar.bz2
gsoc2013-evolution-9a718fdc54a11ffc2dfe90a1c03d832fe151c2e1.tar.lz
gsoc2013-evolution-9a718fdc54a11ffc2dfe90a1c03d832fe151c2e1.tar.xz
gsoc2013-evolution-9a718fdc54a11ffc2dfe90a1c03d832fe151c2e1.tar.zst
gsoc2013-evolution-9a718fdc54a11ffc2dfe90a1c03d832fe151c2e1.zip
Merge commit 'origin/express2' into express2
Diffstat (limited to 'mail/e-mail-reader.c')
-rw-r--r--mail/e-mail-reader.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index b5bcd15b37..6b1fa7df09 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -2300,7 +2300,7 @@ mail_reader_update_actions (EMailReader *reader)
action_name = "mail-mark-junk";
sensitive = selection_has_not_junk_messages;
action = e_mail_reader_get_action (reader, action_name);
- gtk_action_set_sensitive (action, sensitive);
+ gtk_action_set_sensitive (action, sensitive && !(state & E_MAIL_READER_FOLDER_IS_JUNK));
action_name = "mail-mark-not-junk";
sensitive = selection_has_junk_messages;
@@ -2718,6 +2718,7 @@ e_mail_reader_check_state (EMailReader *reader)
gboolean drafts_or_outbox;
gboolean store_supports_vjunk = FALSE;
gboolean is_mailing_list;
+ gboolean is_junk_folder = FALSE;
guint32 state = 0;
guint ii;
@@ -2730,6 +2731,7 @@ e_mail_reader_check_state (EMailReader *reader)
if (folder != NULL) {
store = CAMEL_STORE (folder->parent_store);
store_supports_vjunk = (store->flags & CAMEL_STORE_VJUNK);
+ is_junk_folder = (folder->folder_flags & CAMEL_FOLDER_IS_JUNK) != 0;
}
drafts_or_outbox =
@@ -2845,6 +2847,8 @@ e_mail_reader_check_state (EMailReader *reader)
state |= E_MAIL_READER_SELECTION_HAS_UNREAD;
if (is_mailing_list)
state |= E_MAIL_READER_SELECTION_IS_MAILING_LIST;
+ if (is_junk_folder)
+ state |= E_MAIL_READER_FOLDER_IS_JUNK;
em_utils_uids_free (uids);