[evolution-patches] Patch for bug#208647 with attachment



          Hereby i have attached the patch for the bug # 208647.

        I have added a menu item to the folder tree's right click item and its callback.

        I have associated this menu item's callback with the callback of the File -> Empty Trash  Menu Item.



--
Luv,
S.Antony Vincent Pandian
--- em-folder-tree.c	2005-08-04 00:27:50.000000000 +0530
+++ /home/evolution/cvs/evo/evolution/mail/em-folder-tree.c	2005-08-05 18:43:20.382337880 +0530
@@ -2080,6 +2080,11 @@ emft_popup_rename_folder (EPopup *ep, EP
 	}
 }
 
+static void emft_popup_empty_trash (EPopup *ep, EPopupItem *pitem, void *data)
+{
+	em_utils_empty_trash (data);
+}
+
 static void
 emft_popup_properties (EPopup *ep, EPopupItem *pitem, void *data)
 {
@@ -2115,7 +2120,7 @@ static EPopupItem emft_popup_items[] = {
 	/* 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 },
-	
+	{ E_POPUP_ITEM, "20.emc.03", N_("_Empty Trash"), emft_popup_empty_trash,NULL,NULL, 0, EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_SELECT },
 	{ E_POPUP_BAR, "80.emc" },
 	{ E_POPUP_ITEM, "80.emc.00", N_("_Properties"), emft_popup_properties, NULL, "stock_folder-properties", 0, EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_SELECT }
 };
@@ -2194,8 +2199,11 @@ emft_popup (EMFolderTree *emft, GdkEvent
 	/* FIXME: pass valid fi->flags here */
 	target = em_popup_target_new_folder (emp, uri, info_flags, flags);
 	
-	for (i = 0; i < sizeof (emft_popup_items) / sizeof (emft_popup_items[0]); i++)
-		menus = g_slist_prepend (menus, &emft_popup_items[i]);
+	for (i = 0; i < sizeof (emft_popup_items) / sizeof (emft_popup_items[0]); i++){
+	/* 6 is the position where empty trash menu item will be inserted */
+		if (i != 6 ||  !g_strcasecmp (full_name, CAMEL_VTRASH_NAME))
+			menus = g_slist_prepend (menus, &emft_popup_items[i]);
+	}
 	
 	e_popup_add_items ((EPopup *)emp, menus, NULL, emft_popup_free, emft);
 
--- ChangeLog	2005-08-05 18:34:26.100561056 +0530
+++ /home/evolution/cvs/evo/evolution/mail/ChangeLog	2005-08-05 18:38:30.172456488 +0530
@@ -1,3 +1,9 @@
+2005-08-05  S.Antony Vincent Pandian <santony gmail com>
+
+	* em-folder-tree.c : Fix #208647. Have added a menu item 
+	Empty Trash in the folder tree's right click popup and its
+	callback.
+
 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]