diff options
-rw-r--r-- | mail/ChangeLog | 6 | ||||
-rw-r--r-- | mail/folder-browser.c | 21 |
2 files changed, 23 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index de821302a1..a21bd6d22a 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2002-05-06 Jeffrey Stedfast <fejj@ximian.com> + + * folder-browser.c (on_right_click): If we are in a + Sent/Drafts/Outbox folder, don't show the "Add Sender to + Addressbook" menu item. + 2002-05-06 Not Zed <NotZed@Ximian.com> * component-factory.c (idle_quit): Check all threads are idle as diff --git a/mail/folder-browser.c b/mail/folder-browser.c index 3cd965bd77..beae739c3c 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -1570,7 +1570,8 @@ enum { CAN_MARK_UNIMPORTANT = 1<<9, CAN_FLAG_FOR_FOLLOWUP = 1<<10, CAN_FLAG_COMPLETED = 1<<11, - CAN_CLEAR_FLAG = 1<<12 + CAN_CLEAR_FLAG = 1<<12, + CAN_ADD_SENDER = 1<<13 }; #define MLIST_VFOLDER (3) @@ -1645,9 +1646,9 @@ static EPopupMenu context_menu[] = { E_POPUP_SEPARATOR, - E_POPUP_ITEM (N_("Add Sender to Address_book"), GTK_SIGNAL_FUNC (addrbook_sender), SELECTION_SET), + E_POPUP_ITEM (N_("Add Sender to Address_book"), GTK_SIGNAL_FUNC (addrbook_sender), SELECTION_SET | CAN_ADD_SENDER), - E_POPUP_SEPARATOR, + E_POPUP_SEPARATOR, E_POPUP_ITEM (N_("Appl_y Filters"), GTK_SIGNAL_FUNC (apply_filters), 0), @@ -1759,7 +1760,6 @@ colour_closures_free (GPtrArray *closures) static int on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, FolderBrowser *fb) { - extern CamelFolder *sent_folder; CamelMessageInfo *info; GPtrArray *uids, *closures; int enable_mask = 0; @@ -1772,6 +1772,19 @@ on_right_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event if (!folder_browser_is_sent (fb)) { enable_mask |= CAN_RESEND; hide_mask |= CAN_RESEND; + } else { + enable_mask |= CAN_ADD_SENDER; + hide_mask |= CAN_ADD_SENDER; + } + + if (folder_browser_is_drafts (fb)) { + enable_mask |= CAN_ADD_SENDER; + hide_mask |= CAN_ADD_SENDER; + } + + if (fb->folder == outbox_folder) { + enable_mask |= CAN_ADD_SENDER; + hide_mask |= CAN_ADD_SENDER; } enable_mask |= SELECTION_SET; |