diff options
author | Radek Doulik <rodo@ximian.com> | 2005-01-24 22:46:24 +0800 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2005-01-24 22:46:24 +0800 |
commit | 3d223d457e70f4b4cb1b75a520c7957a6c9b6e1d (patch) | |
tree | eff2cf7fa7d03f69bfba801c53b4be387be27c9a /mail | |
parent | 601b97decb3c0f34a38eee8d59b5378f4c19de40 (diff) | |
download | gsoc2013-evolution-3d223d457e70f4b4cb1b75a520c7957a6c9b6e1d.tar gsoc2013-evolution-3d223d457e70f4b4cb1b75a520c7957a6c9b6e1d.tar.gz gsoc2013-evolution-3d223d457e70f4b4cb1b75a520c7957a6c9b6e1d.tar.bz2 gsoc2013-evolution-3d223d457e70f4b4cb1b75a520c7957a6c9b6e1d.tar.lz gsoc2013-evolution-3d223d457e70f4b4cb1b75a520c7957a6c9b6e1d.tar.xz gsoc2013-evolution-3d223d457e70f4b4cb1b75a520c7957a6c9b6e1d.tar.zst gsoc2013-evolution-3d223d457e70f4b4cb1b75a520c7957a6c9b6e1d.zip |
removed EM_POPUP_SELECT_MARK_[NO]JUNK masks
2005-01-24 Radek Doulik <rodo@ximian.com>
* em-popup.[ch]: removed EM_POPUP_SELECT_MARK_[NO]JUNK masks
2005-01-20 Radek Doulik <rodo@ximian.com>
* em-folder-view.c: patch from Chris Lahey, makes Mark as Junk/not
Junk items active on all messages, removes calls to
message_list_get_selected where not needed
svn path=/trunk/; revision=28527
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 10 | ||||
-rw-r--r-- | mail/em-folder-view.c | 42 | ||||
-rw-r--r-- | mail/em-popup.c | 7 | ||||
-rw-r--r-- | mail/em-popup.h | 8 |
4 files changed, 29 insertions, 38 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 690b99c9be..5f77219536 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,13 @@ +2005-01-24 Radek Doulik <rodo@ximian.com> + + * em-popup.[ch]: removed EM_POPUP_SELECT_MARK_[NO]JUNK masks + +2005-01-20 Radek Doulik <rodo@ximian.com> + + * em-folder-view.c: patch from Chris Lahey, makes Mark as Junk/not + Junk items active on all messages, removes calls to + message_list_get_selected where not needed + 2005-01-24 Not Zed <NotZed@Ximian.com> * searchtypes.xml: changed for 69122. diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index 0c11d2ca6b..aeada91494 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -745,48 +745,40 @@ static void emfv_popup_mark_junk (EPopup *ep, EPopupItem *pitem, void *data) { EMFolderView *emfv = data; - GPtrArray *uids; + int count; - uids = message_list_get_selected(emfv->list); - em_folder_view_mark_selected(emfv, - CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN, - CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN); - if (uids->len == 1) + count = em_folder_view_mark_selected(emfv, + CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN, + CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN); + if (count == 1) message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0); - - message_list_free_uids(emfv->list, uids); } static void emfv_popup_mark_nojunk (EPopup *ep, EPopupItem *pitem, void *data) { EMFolderView *emfv = data; - GPtrArray *uids; + int count; - uids = message_list_get_selected(emfv->list); - em_folder_view_mark_selected(emfv, - CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN, - CAMEL_MESSAGE_JUNK_LEARN); - if (uids->len == 1) + count = em_folder_view_mark_selected(emfv, + CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN, + CAMEL_MESSAGE_JUNK_LEARN); + if (count == 1) message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0); - - message_list_free_uids(emfv->list, uids); } static void emfv_popup_delete(EPopup *ep, EPopupItem *pitem, void *data) { EMFolderView *emfv = data; - GPtrArray *uids; + int count; - uids = message_list_get_selected(emfv->list); - em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED); + count = em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED); - if (uids->len == 1) { + if (count == 1) { if (!message_list_select (emfv->list, MESSAGE_LIST_SELECT_NEXT, 0, 0) && emfv->hide_deleted) message_list_select (emfv->list, MESSAGE_LIST_SELECT_PREVIOUS, 0, 0); } - em_utils_uids_free(uids); } static void @@ -957,8 +949,8 @@ static EPopupItem emfv_popup_items[] = { { E_POPUP_ITEM, "30.emfv.01", N_("Mark as _Unread"), emfv_popup_mark_unread, NULL, "stock_mail-unread", EM_POPUP_SELECT_MARK_UNREAD }, { E_POPUP_ITEM, "30.emfv.02", N_("Mark as _Important"), emfv_popup_mark_important, NULL, "stock_mail-priority-high", EM_POPUP_SELECT_MARK_IMPORTANT }, { E_POPUP_ITEM, "30.emfv.03", N_("_Mark as Unimportant"), emfv_popup_mark_unimportant, NULL, NULL, EM_POPUP_SELECT_MARK_UNIMPORTANT }, - { E_POPUP_ITEM, "30.emfv.04", N_("Mark as _Junk"), emfv_popup_mark_junk, NULL, "stock_spam", EM_POPUP_SELECT_MARK_JUNK }, - { E_POPUP_ITEM, "30.emfv.05", N_("Mark as _Not Junk"), emfv_popup_mark_nojunk, NULL, "stock_not-spam", EM_POPUP_SELECT_MARK_NOJUNK }, + { E_POPUP_ITEM, "30.emfv.04", N_("Mark as _Junk"), emfv_popup_mark_junk, NULL, "stock_spam", EM_POPUP_SELECT_MANY }, + { E_POPUP_ITEM, "30.emfv.05", N_("Mark as _Not Junk"), emfv_popup_mark_nojunk, NULL, "stock_not-spam", EM_POPUP_SELECT_MANY }, { E_POPUP_BAR, "40.emfv" }, { E_POPUP_ITEM, "40.emfv.00", N_("_Delete"), emfv_popup_delete, NULL, "stock_delete", EM_POPUP_SELECT_DELETE }, @@ -1617,8 +1609,8 @@ static const EMFolderViewEnable emfv_enable_map[] = { { "MessageMarkAsUnRead", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_MARK_UNREAD }, { "MessageMarkAsImportant", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_MARK_IMPORTANT }, { "MessageMarkAsUnimportant", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_MARK_UNIMPORTANT }, - { "MessageMarkAsJunk", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_MARK_JUNK }, - { "MessageMarkAsNotJunk", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_MARK_NOJUNK }, + { "MessageMarkAsJunk", EM_POPUP_SELECT_MANY }, + { "MessageMarkAsNotJunk", EM_POPUP_SELECT_MANY }, { "MessageFollowUpFlag", EM_POPUP_SELECT_MANY }, { "MessageMove", EM_POPUP_SELECT_MANY }, { "MessageOpen", EM_POPUP_SELECT_MANY }, diff --git a/mail/em-popup.c b/mail/em-popup.c index 1928192904..bf3a017097 100644 --- a/mail/em-popup.c +++ b/mail/em-popup.c @@ -227,11 +227,6 @@ em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char else mask &= ~EM_POPUP_SELECT_MARK_IMPORTANT; - if (flags & CAMEL_MESSAGE_JUNK) - mask &= ~EM_POPUP_SELECT_MARK_NOJUNK; - else - mask &= ~EM_POPUP_SELECT_MARK_JUNK; - tmp = camel_message_info_user_tag(info, "follow-up"); if (tmp && *tmp) { mask &= ~EM_POPUP_SELECT_FLAG_CLEAR; @@ -760,8 +755,6 @@ static const EPopupHookTargetMask emph_select_masks[] = { { "flag_completed", EM_POPUP_SELECT_FLAG_COMPLETED }, { "flag_clear", EM_POPUP_SELECT_FLAG_CLEAR }, { "add_sender", EM_POPUP_SELECT_ADD_SENDER }, - { "mark_junk", EM_POPUP_SELECT_MARK_JUNK }, - { "mark_nojunk", EM_POPUP_SELECT_MARK_NOJUNK }, { "folder", EM_POPUP_SELECT_FOLDER }, { 0 } }; diff --git a/mail/em-popup.h b/mail/em-popup.h index d35f171629..dc032f6783 100644 --- a/mail/em-popup.h +++ b/mail/em-popup.h @@ -82,8 +82,6 @@ enum _em_popup_target_t { * @EM_POPUP_SELECT_ADD_SENDER: The message contains sender addresses * which might be added to the addressbook. i.e. it isn't a message in * the Sent or Drafts folders. - * @EM_POPUP_SELECT_MARK_JUNK: Message(s) are not marked as junk. - * @EM_POPUP_SELECT_MARK_NOJUNK: Message(s) are marked as junk. * @EM_POPUP_SELECT_FOLDER: A folder is set on the selection. * @EM_POPUP_SELECT_LAST: The last bit used, can be used to add * additional types from derived application code. @@ -104,10 +102,8 @@ enum _em_popup_target_select_t { EM_POPUP_SELECT_FLAG_COMPLETED = 1<<12, EM_POPUP_SELECT_FLAG_CLEAR = 1<<13, EM_POPUP_SELECT_ADD_SENDER = 1<<14, - EM_POPUP_SELECT_MARK_JUNK = 1<<15, - EM_POPUP_SELECT_MARK_NOJUNK = 1<<16, - EM_POPUP_SELECT_FOLDER = 1<<17, /* do we have any folder at all? */ - EM_POPUP_SELECT_LAST = 1<<18, /* reserve 2 slots */ + EM_POPUP_SELECT_FOLDER = 1<<15, /* do we have any folder at all? */ + EM_POPUP_SELECT_LAST = 1<<17, /* reserve 2 slots */ }; /** |