diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-12-10 11:50:36 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-12-10 11:50:36 +0800 |
commit | b5e7713c8e99f2cddf309d3034108c18190fd3cb (patch) | |
tree | b6b22ff8bdbb379e0e4e939c09df54a8dd52c447 /mail/folder-browser.c | |
parent | 098db6b2ad41196ee43d68e7f4f7d879d97d93b7 (diff) | |
download | gsoc2013-evolution-b5e7713c8e99f2cddf309d3034108c18190fd3cb.tar gsoc2013-evolution-b5e7713c8e99f2cddf309d3034108c18190fd3cb.tar.gz gsoc2013-evolution-b5e7713c8e99f2cddf309d3034108c18190fd3cb.tar.bz2 gsoc2013-evolution-b5e7713c8e99f2cddf309d3034108c18190fd3cb.tar.lz gsoc2013-evolution-b5e7713c8e99f2cddf309d3034108c18190fd3cb.tar.xz gsoc2013-evolution-b5e7713c8e99f2cddf309d3034108c18190fd3cb.tar.zst gsoc2013-evolution-b5e7713c8e99f2cddf309d3034108c18190fd3cb.zip |
Implements marking messages as "Need Reply".
Implements marking messages as "Need Reply".
2001-12-09 Jon Trowbridge <trow@ximian.com>
* mail-need-reply.xpm: Added a really, really ugly and
awful icon to symbolize "message needs a reply".
* Makefile.am (EXTRA_DIST): Added mail-need-reply.xpm.
2001-12-09 Jon Trowbridge <trow@ximian.com>
* camel-folder-summary.c: Add "NeedsReply" to the flag_names array
for CAMEL_MESSAGE_NEEDS_REPLY.
* camel-folder-summary.h: Added CAMEL_MESSAGE_NEEDS_REPLY flag.
2001-12-09 Jon Trowbridge <trow@ximian.com>
* vfoldertypes.xml: Add "Needs Reply" option to different status
types.
* filtertypes.xml: Add "Needs Reply" option to different status
types.
2001-12-09 Jon Trowbridge <trow@ximian.com>
* message-list.c: #include "art/mail-need-reply.xpm".
(ml_tree_value_at): Adjust magic numbers, show "Need Reply" icon
if the message needs reply.
(message_list_create_extras): Adjust magic numbers to add new
icon.
(on_click): Changed to toggle between unread, read, and need reply
when the status icon is clicked.
* mail-callbacks.c (mark_as_needing_reply): Added.
(mark_as_not_needing_reply): Added. Add "set" value to struct
post_send_data.
(composer_sent_cb): Use both "flags" and "set" elements of
post_send_data when setting message flags.
(mail_reply): Clear "Needs Reply" flag when we actually reply to a
message.
* folder-browser.c: Changed flag values to be given by
bit-shifting (1<<5) vs. base-ten (32). Added
CAN_MARK_DOESNT_NEED_REPLY flag. Added "Mark as Needing Reply"
and "Mark as Not Needing Reply" elements to context menu.
(on_right_click): Hide "Mark as (Not) Needing Reply" context menu
elements as appropriate.
svn path=/trunk/; revision=14946
Diffstat (limited to 'mail/folder-browser.c')
-rw-r--r-- | mail/folder-browser.c | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/mail/folder-browser.c b/mail/folder-browser.c index ddcc305fe6..158ce0cc0e 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -1412,15 +1412,17 @@ hide_sender(GtkWidget *w, FolderBrowser *fb) } enum { - SELECTION_SET = 2, - CAN_MARK_READ = 4, - CAN_MARK_UNREAD = 8, - CAN_DELETE = 16, - CAN_UNDELETE = 32, - IS_MAILING_LIST = 64, - CAN_RESEND = 128, - CAN_MARK_IMPORTANT = 256, - CAN_MARK_UNIMPORTANT = 512 + SELECTION_SET = 1<<1, + CAN_MARK_READ = 1<<2, + CAN_MARK_UNREAD = 1<<3, + CAN_DELETE = 1<<4, + CAN_UNDELETE = 1<<5, + IS_MAILING_LIST = 1<<6, + CAN_RESEND = 1<<7, + CAN_MARK_IMPORTANT = 1<<8, + CAN_MARK_UNIMPORTANT = 1<<9, + CAN_MARK_NEEDS_REPLY = 1<<10, + CAN_MARK_DOESNT_NEED_REPLY = 1<<11 }; #define MLIST_VFOLDER (3) @@ -1460,6 +1462,8 @@ 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, CAN_MARK_IMPORTANT }, { N_("Mark as Unim_portant"), NULL, GTK_SIGNAL_FUNC (mark_as_unimportant), NULL, CAN_MARK_UNIMPORTANT }, + { N_("Mark as Needing Reply"), NULL, GTK_SIGNAL_FUNC (mark_as_needing_reply), NULL, CAN_MARK_NEEDS_REPLY }, + { N_("Mark as Not Needing Reply"), NULL, GTK_SIGNAL_FUNC (mark_as_not_needing_reply), NULL, CAN_MARK_DOESNT_NEED_REPLY }, E_POPUP_SEPARATOR, @@ -1550,6 +1554,8 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event gboolean have_unseen = FALSE; gboolean have_important = FALSE; gboolean have_unimportant = FALSE; + gboolean have_needs_reply = FALSE; + gboolean have_doesnt_need_reply = FALSE; for (i = 0; i < uids->len; i++) { info = camel_folder_get_message_info (fb->folder, uids->pdata[i]); @@ -1570,6 +1576,11 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event have_important = TRUE; else have_unimportant = TRUE; + + if (info->flags & CAMEL_MESSAGE_NEEDS_REPLY) + have_needs_reply = TRUE; + else + have_doesnt_need_reply = TRUE; camel_folder_free_message_info (fb->folder, info); @@ -1591,6 +1602,11 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event enable_mask |= CAN_MARK_IMPORTANT; if (!have_important) enable_mask |= CAN_MARK_UNIMPORTANT; + + if (!have_needs_reply) + enable_mask |= CAN_MARK_DOESNT_NEED_REPLY; + if (!have_doesnt_need_reply) + enable_mask |= CAN_MARK_NEEDS_REPLY; /* * Hide items that wont get used. @@ -1615,6 +1631,13 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event else hide_mask |= CAN_MARK_UNIMPORTANT; } + + if (!(have_needs_reply && have_doesnt_need_reply)) { + if (have_needs_reply) + hide_mask |= CAN_MARK_NEEDS_REPLY; + else + hide_mask |= CAN_MARK_DOESNT_NEED_REPLY; + } } /* free uids */ |