Re: [evolution-patches] Mailer : Patch for bug#311719 (UI)




hi

     have introduced 2 new flags EM_POPUP_SELECT_JUNK and EM_POPUP_SELECT_NOT_JUNK.

     and have implemented the required functionalities.

     messages in :

                  junk folder have "Mark as Not Junk" option

                 trash do not have both the "Mark as *" options

                 other folders have "Mark as Junk" option


On 8/10/05, Not Zed <notzed ximian com> wrote:

Several problems:

      * mismatch of style
      * enable is not a boolean, it is a bitmask
      * hardcoded offsets in a big table is just asking for maintenance
        troubles.

Read up on e-popup in the plugin manual; you probably want to add a new
qualitifcation flag into em-popup, much the same way
EM_POPUP_SELECT_DELETE is defined - search for 'delete' case
insensitively in em-popup.[ch] to see how that flag is implemented.


On Wed, 2005-08-10 at 00:17 +0530, Antony Vincent Pandian wrote:
> I have attached the patch for the bug # 311719.This patch
> correspondingly enables and disables the Mark as Junk and Mark as Not
> Junk in the right click menu of the messages.
>
> --
> Luv,
> S.Antony Vincent Pandian
> _______________________________________________
> evolution-patches mailing list
> evolution-patches lists ximian com
> http://lists.ximian.com/mailman/listinfo/evolution-patches
--
adfa(evolution-2.4:20087): gtkhtml-WARNING **: cannot find icon:
'stock_insert-url' in gnome




--
Luv,
S.Antony Vincent Pandian
--- /home/evolution/Antony/junk_disable_bug/em-popup.h	2005-08-10 18:37:07.000000000 +0530
+++ em-popup.h	2005-08-10 19:45:57.000000000 +0530
@@ -104,6 +104,8 @@ enum _em_popup_target_select_t {
 	EM_POPUP_SELECT_ADD_SENDER         = 1<<14,
 	EM_POPUP_SELECT_FOLDER             = 1<<15,     /* do we have any folder at all? */
 	EM_POPUP_SELECT_LAST               = 1<<17,     /* reserve 2 slots */
+	EM_POPUP_SELECT_JUNK		   = 1<<18,
+	EM_POPUP_SELECT_NOT_JUNK	   = 1<<19,
 };
 
 /**
--- /home/evolution/Antony/junk_disable_bug/em-popup.c	2005-08-10 18:37:12.000000000 +0530
+++ em-popup.c	2005-08-11 23:51:58.576898696 +0530
@@ -229,6 +229,11 @@ em_popup_target_new_select(EMPopup *emp,
 		else
 			mask &= ~EM_POPUP_SELECT_MARK_IMPORTANT;
 
+		if (flags & CAMEL_MESSAGE_JUNK)
+			mask &= ~EM_POPUP_SELECT_NOT_JUNK;
+		else if ((flags & CAMEL_MESSAGE_DELETED) != CAMEL_MESSAGE_DELETED)
+			mask &= ~EM_POPUP_SELECT_JUNK;
+
 		tmp = camel_message_info_user_tag(info, "follow-up");
 		if (tmp && *tmp) {
 			mask &= ~EM_POPUP_SELECT_FLAG_CLEAR;
--- /home/evolution/Antony/junk_disable_bug/em-folder-view.c	2005-08-09 23:40:36.000000000 +0530
+++ em-folder-view.c	2005-08-11 00:12:42.000000000 +0530
@@ -1055,8 +1055,8 @@ static EPopupItem emfv_popup_items[] = {
 	{ E_POPUP_ITEM, "50.emfv.01", N_("Mark as U_nread"), emfv_popup_mark_unread, NULL, "stock_mail-unread", EM_POPUP_SELECT_MARK_UNREAD|EM_FOLDER_VIEW_SELECT_LISTONLY },
 	{ E_POPUP_ITEM, "50.emfv.02", N_("Mark as _Important"), emfv_popup_mark_important, NULL, "stock_mail-priority-high", EM_POPUP_SELECT_MARK_IMPORTANT|EM_FOLDER_VIEW_SELECT_LISTONLY },
 	{ E_POPUP_ITEM, "50.emfv.03", N_("_Mark as Unimportant"), emfv_popup_mark_unimportant, NULL, NULL, EM_POPUP_SELECT_MARK_UNIMPORTANT|EM_FOLDER_VIEW_SELECT_LISTONLY },
-	{ E_POPUP_ITEM, "50.emfv.04", N_("Mark as _Junk"), emfv_popup_mark_junk, NULL, "stock_spam", EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY },
-	{ E_POPUP_ITEM, "50.emfv.05", N_("Mark as _Not Junk"), emfv_popup_mark_nojunk, NULL, "stock_not-spam", EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY },
+	{ E_POPUP_ITEM, "50.emfv.04", N_("Mark as _Junk"), emfv_popup_mark_junk, NULL, "stock_spam", EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY|EM_POPUP_SELECT_JUNK },
+	{ E_POPUP_ITEM, "50.emfv.05", N_("Mark as _Not Junk"), emfv_popup_mark_nojunk, NULL, "stock_not-spam", EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY|EM_POPUP_SELECT_NOT_JUNK },
 	{ E_POPUP_ITEM, "50.emfv.06", N_("Mark for Follo_w Up..."), emfv_popup_flag_followup, NULL, "stock_mail-flag-for-followup",  EM_POPUP_SELECT_FLAG_FOLLOWUP|EM_FOLDER_VIEW_SELECT_LISTONLY },
 
 	{ E_POPUP_SUBMENU, "60.label.00", N_("Label"), NULL, NULL, NULL, EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY },
--- /home/evolution/Antony/empty_trash_bug/ChangeLog	2005-08-05 18:34:26.000000000 +0530
+++ /home/evolution/Antony/junk_disable_bug/ChangeLog	2005-08-12 00:00:28.028450288 +0530
@@ -1,3 +1,10 @@
+2005-08-10 S.Antony Vincent Pandian <santony gmail com>
+
+	* em-folder-view.c : Fix #311719.Add two flags each for junk and  
+	not junk.Based on the place where the message resides,the Mark as
+	junk and Mark as Not Junk menu items in the right click popup
+	menu item are made visible or invisible. 
+
 2005-07-29  Shreyas Srinivasan  <sshreyas novell com>
 
 	* mail-ops.c: Fix #311223. Include <camel/camel-multipart.h>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]