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/em-folder-view.c | |
parent | 601b97decb3c0f34a38eee8d59b5378f4c19de40 (diff) | |
download | gsoc2013-evolution-3d223d457e70f4b4cb1b75a520c7957a6c9b6e1d.tar.gz 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/em-folder-view.c')
-rw-r--r-- | mail/em-folder-view.c | 42 |
1 files changed, 17 insertions, 25 deletions
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 }, |