Re: [evolution-patches] Patch for bug#208647 with attachment
- From: Antony Vincent Pandian <santony gmail com>
- To: Not Zed <notzed ximian com>
- Cc: evolution-patches <evolution-patches lists ximian com>, Parthasarathi <sparthasarathi novell com>
- Subject: Re: [evolution-patches] Patch for bug#208647 with attachment
- Date: Wed, 10 Aug 2005 18:03:49 +0530
i have attached the patch herewith for adding to empty trash menu item.
i have checked the folder type with folderinfo's flags and displayed the menu item.
On 8/10/05, Not Zed <notzed ximian com
> wrote:
See my last comment below; full_name or name is not enough.
On Tue, 2005-08-09 at 20:42 +0530, Antony Vincent Pandian wrote:
> Hope this looks good.Since the info_flags holds good for both vtrash
> and vjunk i had to compare the full_name and not the folder name with
> CAMEL_VTRASH_NAME.
>
> On 8/5/05, Not Zed <notzed ximian com> wrote:
>
> This is extremely messy. If you want to add another menu
> item, define
> it separetely.
>
> Apart from that, you can't base the vtrash test on the folder
> name.
> Base it on the folder type from the folderinfo.
--
adfa(evolution-2.4
:20087): gtkhtml-WARNING **: cannot find icon:
'stock_insert-url' in gnome
--
Luv,
S.Antony Vincent Pandian
--- /home/evolution/Antony/empty_trash_bug/em-folder-tree.c 2005-08-10 18:09:14.646310144 +0530
+++ em-folder-tree.c 2005-08-10 18:08:09.794169168 +0530
@@ -2080,6 +2080,12 @@ 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)
{
@@ -2119,6 +2125,7 @@ static EPopupItem emft_popup_items[] = {
{ 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 }
};
+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 void
emft_popup_free(EPopup *ep, GSList *items, void *data)
@@ -2138,6 +2145,7 @@ emft_popup (EMFolderTree *emft, GdkEvent
GSList *menus = NULL;
guint32 info_flags = 0;
guint32 flags = 0;
+ guint32 folder_flags = 0;
gboolean isstore;
char *uri, *full_name;
GtkMenu *menu;
@@ -2156,7 +2164,7 @@ emft_popup (EMFolderTree *emft, GdkEvent
gtk_tree_model_get (model, &iter, COL_POINTER_CAMEL_STORE, &store,
COL_STRING_URI, &uri, COL_STRING_FULL_NAME, &full_name,
- COL_BOOL_IS_STORE, &isstore, -1);
+ COL_BOOL_IS_STORE, &isstore,COL_UINT_FLAGS, &folder_flags, -1);
/* Stores have full_name == NULL, otherwise its just a placeholder */
/* NB: This is kind of messy */
@@ -2197,6 +2205,9 @@ emft_popup (EMFolderTree *emft, GdkEvent
for (i = 0; i < sizeof (emft_popup_items) / sizeof (emft_popup_items[0]); i++)
menus = g_slist_prepend (menus, &emft_popup_items[i]);
+ if ((folder_flags & CAMEL_FOLDER_TYPE_TRASH) == CAMEL_FOLDER_TYPE_TRASH)
+ menus = g_slist_prepend (menus, &trash_popup_item);
+
e_popup_add_items ((EPopup *)emp, menus, NULL, emft_popup_free, emft);
menu = e_popup_create_menu_once ((EPopup *)emp, (EPopupTarget *)target, 0);
--- /home/evolution/Antony/empty_trash_bug/ChangeLog 2005-08-05 18:34:26.000000000 +0530
+++ ChangeLog 2005-08-05 18:38:30.000000000 +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]