aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-popup.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2005-10-18 16:31:39 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2005-10-18 16:31:39 +0800
commitce7790405d57206d48f7ceedf2b40c84cb4d5a68 (patch)
tree6dd3adca8e1eb94f20b799d4bd384b32434832dd /mail/em-popup.c
parente751338e4953544b113b19ed0ea8eeebfb0b111d (diff)
downloadgsoc2013-evolution-ce7790405d57206d48f7ceedf2b40c84cb4d5a68.tar
gsoc2013-evolution-ce7790405d57206d48f7ceedf2b40c84cb4d5a68.tar.gz
gsoc2013-evolution-ce7790405d57206d48f7ceedf2b40c84cb4d5a68.tar.bz2
gsoc2013-evolution-ce7790405d57206d48f7ceedf2b40c84cb4d5a68.tar.lz
gsoc2013-evolution-ce7790405d57206d48f7ceedf2b40c84cb4d5a68.tar.xz
gsoc2013-evolution-ce7790405d57206d48f7ceedf2b40c84cb4d5a68.tar.zst
gsoc2013-evolution-ce7790405d57206d48f7ceedf2b40c84cb4d5a68.zip
Fixed mark junk, keybinding to focus search widget.
2005-10-18 Srinivasa Ragavan <sragavan@novell.com> * Fixed mark junk, keybinding to focus search widget. svn path=/trunk/; revision=30520
Diffstat (limited to 'mail/em-popup.c')
-rw-r--r--mail/em-popup.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/mail/em-popup.c b/mail/em-popup.c
index 965365957e..a31ca6866d 100644
--- a/mail/em-popup.c
+++ b/mail/em-popup.c
@@ -175,6 +175,7 @@ EMPopupTargetSelect *
em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids)
{
EMPopupTargetSelect *t = e_popup_target_new(&emp->popup, EM_POPUP_TARGET_SELECT, sizeof(*t));
+ CamelStore *store = CAMEL_STORE (folder->parent_store);
guint32 mask = ~0;
int i;
const char *tmp;
@@ -218,7 +219,18 @@ em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char
mask &= ~EM_POPUP_SELECT_MARK_UNREAD;
else
mask &= ~EM_POPUP_SELECT_MARK_READ;
-
+
+ if (store->flags & CAMEL_STORE_VJUNK) {
+ if ((flags & CAMEL_MESSAGE_JUNK))
+ mask &= ~EM_POPUP_SELECT_NOT_JUNK;
+ else
+ mask &= ~EM_POPUP_SELECT_JUNK;
+ } else {
+ /* Show both options */
+ mask &= ~EM_POPUP_SELECT_NOT_JUNK;
+ mask &= ~EM_POPUP_SELECT_JUNK;
+ }
+
if (flags & CAMEL_MESSAGE_DELETED)
mask &= ~EM_POPUP_SELECT_UNDELETE;
else
@@ -830,6 +842,8 @@ static const EPopupHookTargetMask emph_select_masks[] = {
{ "flag_clear", EM_POPUP_SELECT_FLAG_CLEAR },
{ "add_sender", EM_POPUP_SELECT_ADD_SENDER },
{ "folder", EM_POPUP_SELECT_FOLDER },
+ { "junk", EM_POPUP_SELECT_JUNK },
+ { "not_junk", EM_POPUP_SELECT_NOT_JUNK },
{ 0 }
};