[evolution-patches] Fix for bug #317466 [mail]



Hi

Attached fix for Bug# 317466 –  Confusing search folders UI
http://bugzilla.gnome.org/show_bug.cgi?id=317466

Please Review

Thanks,
Ranjan
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3781
diff -u -p -r1.3781 ChangeLog
--- mail/ChangeLog	26 Jan 2006 16:14:54 -0000	1.3781
+++ mail/ChangeLog	27 Jan 2006 12:06:59 -0000
@@ -1,3 +1,9 @@
+2006-01-27  Ranjan Somani  <sranjan novell com>
+	
+	**Fixes #317466	
+      
+	* em-folder-tree.c: On right-clicking search folder the appropriate popup menu is shown
+	
 2006-01-26  Oswald Rodrigues <ozzy_rodrigues yahoo com>
 
 	* em-popup.c: Corrected typo. changed Add to Addressbook to Add 
Index: mail/em-folder-tree.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-tree.c,v
retrieving revision 1.157
diff -u -p -r1.157 em-folder-tree.c
--- mail/em-folder-tree.c	22 Oct 2005 08:18:50 -0000	1.157
+++ mail/em-folder-tree.c	27 Jan 2006 12:07:06 -0000
@@ -72,6 +72,8 @@
 #include "em-folder-properties.h"
 
 #define d(x)
+#define NEW_FOLDER 0
+#define NEW_SEARCH_FOLDER 1
 
 struct _selected_uri {
 	char *key;		/* store:path or account/path */
@@ -2048,8 +2050,6 @@ static EPopupItem emft_popup_items[] = {
 	{ E_POPUP_ITEM, "10.emc.01", N_("_Move..."), emft_popup_move, NULL, "stock_folder-move", 0, EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_DELETE },
 	
 	{ E_POPUP_BAR, "20.emc" },
-	/* FIXME: need to disable for nochildren folders */
-	{ E_POPUP_ITEM, "20.emc.00", N_("_New Folder..."), emft_popup_new_folder, NULL, "stock_new-dir", 0, EM_POPUP_FOLDER_INFERIORS },
 	/* FIXME: need to disable for undeletable folders */
 	{ E_POPUP_ITEM, "20.emc.01", N_("_Delete"), emft_popup_delete_folder, NULL, "stock_delete", 0, EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_DELETE },
 	{ E_POPUP_ITEM, "20.emc.02", N_("_Rename..."), emft_popup_rename_folder, NULL, NULL, 0, EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_DELETE },
@@ -2058,6 +2058,10 @@ static EPopupItem emft_popup_items[] = {
 	{ E_POPUP_ITEM, "80.emc.00", N_("_Properties"), emft_popup_properties, NULL, "stock_folder-properties", 0, EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_SELECT }
 };
 static EPopupItem trash_popup_item = {E_POPUP_ITEM, "20.emc.03", N_("_Empty Trash"), emft_popup_empty_trash,NULL,NULL, 1, EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_SELECT};
+static EPopupItem folder_popup_items[] = {
+	{ E_POPUP_ITEM, "20.emc.00", N_("_New Folder..."), emft_popup_new_folder, NULL, "stock_new-dir", 0, EM_POPUP_FOLDER_INFERIORS },
+	{ E_POPUP_ITEM, "20.emc.00", N_("_New Search Folder..."), emft_popup_new_folder, NULL, "stock_new-dir", 0, EM_POPUP_FOLDER_INFERIORS }
+};
 
 static void
 emft_popup_free(EPopup *ep, GSList *items, void *data)
@@ -2139,7 +2143,12 @@ emft_popup (EMFolderTree *emft, GdkEvent
 	
 	if ((folder_type_flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_TRASH)
 		menus = g_slist_prepend (menus, &trash_popup_item);
-
+	
+	if (!CAMEL_IS_VEE_STORE(store))
+		menus = g_slist_prepend (menus, &folder_popup_items[NEW_FOLDER]);
+	else
+		menus = g_slist_prepend (menus, &folder_popup_items[NEW_SEARCH_FOLDER]);
+	
 	e_popup_add_items ((EPopup *)emp, menus, NULL, emft_popup_free, emft);
 
 	menu = e_popup_create_menu_once ((EPopup *)emp, (EPopupTarget *)target, 0);


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