[evolution-patches] [mailer] #57090 Junk Button Sensitivity needs changes
- From: Radek Doulík <rodo novell com>
- To: Patches <evolution-patches ximian com>
- Cc: Jeffrey Stedfast <fejj ximian com>, Not Zed <notzed ximian com>
- Subject: [evolution-patches] [mailer] #57090 Junk Button Sensitivity needs changes
- Date: Thu, 20 Jan 2005 12:48:18 +0100
I am attaching updated clahey's patch from bugzilla which we need to get in before UI freeze.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3537
diff -u -p -r1.3537 ChangeLog
--- ChangeLog 20 Jan 2005 03:56:21 -0000 1.3537
+++ ChangeLog 20 Jan 2005 11:17:22 -0000
@@ -1,3 +1,9 @@
+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-20 Not Zed <NotZed Ximian com>
** See bug #55831.
Index: em-folder-view.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-view.c,v
retrieving revision 1.100
diff -u -p -r1.100 em-folder-view.c
--- em-folder-view.c 20 Jan 2005 03:56:22 -0000 1.100
+++ em-folder-view.c 20 Jan 2005 11:17:25 -0000
@@ -744,48 +744,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
@@ -956,8 +948,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 },
@@ -1616,8 +1608,8 @@ static const EMFolderViewEnable emfv_ena
{ "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 },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]