[evolution-patches] patch to add a visibilty mask for groupwise Sent Item folder



Hi Notzed,
          Have added a visibility mask to mask the menu item in the
right click popup. This menu item should be visible only when the right
click event happens from the groupwise Sent Items folder on a single
mail message. Have attached the patch for the same, comparing the URI
and the folder name. Is there any oter better way of doing this ?

thanks, chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3533
diff -u -p -r1.3533 ChangeLog
--- ChangeLog	18 Jan 2005 06:09:31 -0000	1.3533
+++ ChangeLog	18 Jan 2005 11:44:03 -0000
@@ -1,3 +1,10 @@
+2005-01-18  Chenthill Palanisamy <pchenthill novell com>
+
+	* em-popup.c: (em_popup_target_new_select): 
+	* em-popup.h: Added a new mask for displaying the menu 
+	item in the popup menu when invoked from groupwise Sent
+	Items folder.
+
 2005-01-18  Not Zed  <NotZed Ximian com>
 
 	** See bug #70768.
Index: em-popup.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-popup.c,v
retrieving revision 1.32
diff -u -p -r1.32 em-popup.c
--- em-popup.c	22 Dec 2004 07:38:16 -0000	1.32
+++ em-popup.c	18 Jan 2005 11:44:03 -0000
@@ -192,6 +192,9 @@ em_popup_target_new_select(EMPopup *emp,
 	
 	if (em_utils_folder_is_sent(folder, folder_uri))
 		mask &= ~EM_POPUP_SELECT_EDIT;
+
+	if (g_str_has_prefix (folder_uri, "groupwise://") && g_str_has_suffix (folder_uri, "Sent Items") && uids->len == 1) 
+		mask &= ~EM_POPUP_SELECT_GW_SENT_ITEM;
 	
 	if (!(em_utils_folder_is_drafts(folder, folder_uri)
 	      || em_utils_folder_is_outbox(folder, folder_uri))
@@ -763,6 +766,7 @@ static const EPopupHookTargetMask emph_s
 	{ "mark_junk", EM_POPUP_SELECT_MARK_JUNK },
 	{ "mark_nojunk", EM_POPUP_SELECT_MARK_NOJUNK },
 	{ "folder", EM_POPUP_SELECT_FOLDER },
+	{ "gw_sent_items", EM_POPUP_SELECT_GW_SENT_ITEM },
 	{ 0 }
 };
 
Index: em-popup.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-popup.h,v
retrieving revision 1.10
diff -u -p -r1.10 em-popup.h
--- em-popup.h	20 Sep 2004 05:59:55 -0000	1.10
+++ em-popup.h	18 Jan 2005 11:44:03 -0000
@@ -108,6 +108,7 @@ enum _em_popup_target_select_t {
 	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_GW_SENT_ITEM	   = 1<<19, 
 };
 
 /**


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