aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-popup.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2007-11-05 19:33:47 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-11-05 19:33:47 +0800
commitaf8315fae1717faa91c26a3051b8b6f07f95062c (patch)
treeb1c3bf5d5771336a405fed0c3bfe7b8368c27386 /mail/em-popup.c
parent65409dae98a7812c1b4c547aabf707ac1f43da2f (diff)
downloadgsoc2013-evolution-af8315fae1717faa91c26a3051b8b6f07f95062c.tar
gsoc2013-evolution-af8315fae1717faa91c26a3051b8b6f07f95062c.tar.gz
gsoc2013-evolution-af8315fae1717faa91c26a3051b8b6f07f95062c.tar.bz2
gsoc2013-evolution-af8315fae1717faa91c26a3051b8b6f07f95062c.tar.lz
gsoc2013-evolution-af8315fae1717faa91c26a3051b8b6f07f95062c.tar.xz
gsoc2013-evolution-af8315fae1717faa91c26a3051b8b6f07f95062c.tar.zst
gsoc2013-evolution-af8315fae1717faa91c26a3051b8b6f07f95062c.zip
** Fix for bug #488298
2007-11-05 Milan Crha <mcrha@redhat.com> ** Fix for bug #488298 * em-folder-view.c: (EMFolderViewEnable emfv_enable_map[]): Disable "MessageMarkAsNotJunk" if requested by context. * mail-folder-cache.c: (update_1folder): Do not count junked messages into "new" messages in drafts and out box. * em-popup.c: (em_popup_target_new_select): Disable "MarkAsJunk" and "MarnAsNotJunk" in drafts and out box. svn path=/trunk/; revision=34502
Diffstat (limited to 'mail/em-popup.c')
-rw-r--r--mail/em-popup.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mail/em-popup.c b/mail/em-popup.c
index 6e0fc4cc6d..63f7291dfe 100644
--- a/mail/em-popup.c
+++ b/mail/em-popup.c
@@ -178,6 +178,7 @@ em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char
EMPopupTargetSelect *t = e_popup_target_new(&emp->popup, EM_POPUP_TARGET_SELECT, sizeof(*t));
CamelStore *store = CAMEL_STORE (folder->parent_store);
guint32 mask = ~0;
+ gboolean draft_or_outbox;
int i;
const char *tmp;
@@ -197,9 +198,8 @@ em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char
if (em_utils_folder_is_sent(folder, folder_uri))
mask &= ~EM_POPUP_SELECT_EDIT;
- if (!(em_utils_folder_is_drafts(folder, folder_uri)
- || em_utils_folder_is_outbox(folder, folder_uri))
- && uids->len == 1)
+ draft_or_outbox = em_utils_folder_is_drafts(folder, folder_uri) || em_utils_folder_is_outbox(folder, folder_uri);
+ if (!draft_or_outbox && uids->len == 1)
mask &= ~EM_POPUP_SELECT_ADD_SENDER;
if (uids->len == 1)
@@ -221,11 +221,15 @@ em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char
else
mask &= ~EM_POPUP_SELECT_MARK_READ;
- if (store->flags & CAMEL_STORE_VJUNK) {
+ if ((store->flags & CAMEL_STORE_VJUNK) && !draft_or_outbox) {
if ((flags & CAMEL_MESSAGE_JUNK))
mask &= ~EM_POPUP_SELECT_NOT_JUNK;
else
mask &= ~EM_POPUP_SELECT_JUNK;
+ } else if (draft_or_outbox) {
+ /* Show none option */
+ mask |= EM_POPUP_SELECT_NOT_JUNK;
+ mask |= EM_POPUP_SELECT_JUNK;
} else {
/* Show both options */
mask &= ~EM_POPUP_SELECT_NOT_JUNK;