aboutsummaryrefslogtreecommitdiffstats
path: root/mail/folder-browser.c
diff options
context:
space:
mode:
authorJason Leach <jleach@ximian.com>2001-07-24 03:14:53 +0800
committerJacob Leach <jleach@src.gnome.org>2001-07-24 03:14:53 +0800
commitb4f3f0c1028773d2f06a1a9311037a8cdccb84cf (patch)
treec823783a489a7aa9be46a345e13ed812403e2a82 /mail/folder-browser.c
parent05ec4697c84a948310556b88e451c9dfc663967e (diff)
downloadgsoc2013-evolution-b4f3f0c1028773d2f06a1a9311037a8cdccb84cf.tar
gsoc2013-evolution-b4f3f0c1028773d2f06a1a9311037a8cdccb84cf.tar.gz
gsoc2013-evolution-b4f3f0c1028773d2f06a1a9311037a8cdccb84cf.tar.bz2
gsoc2013-evolution-b4f3f0c1028773d2f06a1a9311037a8cdccb84cf.tar.lz
gsoc2013-evolution-b4f3f0c1028773d2f06a1a9311037a8cdccb84cf.tar.xz
gsoc2013-evolution-b4f3f0c1028773d2f06a1a9311037a8cdccb84cf.tar.zst
gsoc2013-evolution-b4f3f0c1028773d2f06a1a9311037a8cdccb84cf.zip
[Bug #5225: No UI way to mark as unimportant]
2001-07-23 Jason Leach <jleach@ximian.com> [Bug #5225: No UI way to mark as unimportant] * folder-browser.c (on_right_click): Do the necessary stuff to show or hide the correct "Mark Important" or "Mark as Unimportant" menu items depending on the status of messages that are selected. * folder-browser-ui.c: Add the MarkAsUnimportant verb here. * mail-callbacks.c (mark_as_unimportant): Simple function that's the callback for these new menu items. svn path=/trunk/; revision=11316
Diffstat (limited to 'mail/folder-browser.c')
-rw-r--r--mail/folder-browser.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 0d3d0545a9..7cc1071112 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -1223,6 +1223,8 @@ enum {
CAN_UNDELETE = 32,
IS_MAILING_LIST = 64,
CAN_RESEND = 128,
+ CAN_MARK_IMPORTANT = 256,
+ CAN_MARK_UNIMPORTANT = 512
};
#define MLIST_VFOLDER (3)
@@ -1287,7 +1289,9 @@ static EPopupMenu context_menu[] = {
{ N_("Mark as U_nread"), NULL,
GTK_SIGNAL_FUNC (mark_as_unseen), NULL, CAN_MARK_UNREAD },
{ N_("Mark as _Important"), NULL,
- GTK_SIGNAL_FUNC (mark_as_important), NULL, 0 },
+ GTK_SIGNAL_FUNC (mark_as_important), NULL, CAN_MARK_IMPORTANT },
+ { N_("Mark as Unim_portant"), NULL,
+ GTK_SIGNAL_FUNC (mark_as_unimportant), NULL, CAN_MARK_UNIMPORTANT },
E_POPUP_SEPARATOR,
@@ -1391,6 +1395,8 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event
gboolean have_undeleted = FALSE;
gboolean have_seen = FALSE;
gboolean have_unseen = FALSE;
+ gboolean have_important = FALSE;
+ gboolean have_unimportant = FALSE;
for (i = 0; i < uids->len; i++) {
info = camel_folder_get_message_info (fb->folder, uids->pdata[i]);
@@ -1406,6 +1412,11 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event
have_deleted = TRUE;
else
have_undeleted = TRUE;
+
+ if (info->flags & CAMEL_MESSAGE_FLAGGED)
+ have_important = TRUE;
+ else
+ have_unimportant = TRUE;
camel_folder_free_message_info(fb->folder, info);
@@ -1423,6 +1434,11 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event
if (!have_deleted)
enable_mask |= CAN_UNDELETE;
+ if (!have_unimportant)
+ enable_mask |= CAN_MARK_IMPORTANT;
+ if (!have_important)
+ enable_mask |= CAN_MARK_UNIMPORTANT;
+
/*
* Hide items that wont get used.
*/
@@ -1438,6 +1454,12 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event
else
hide_mask |= CAN_UNDELETE;
}
+ if (!(have_important && have_unimportant)){
+ if (have_important)
+ hide_mask |= CAN_MARK_IMPORTANT;
+ else
+ hide_mask |= CAN_MARK_UNIMPORTANT;
+ }
}
/* free uids */