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: Thu, 11 Aug 2005 13:10:02 +0530
Here's the patch with the asked
(folder_type_flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_TRASH
instead of the already given one.
On 8/11/05, Not Zed <notzed ximian com> wrote:
Thanks, almost ...
Strictly, you need to do
(folder_type_flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_TRASH
instead.
On Wed, 2005-08-10 at 18:03 +0530, Antony Vincent Pandian wrote:
> if ((folder_flags & CAMEL_FOLDER_TYPE_TRASH) ==
> CAMEL_FOLDER_TYPE_TRASH)
>
+
menus = g_slist_prepend (menus, &trash_popup_item);
--
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.000000000 +0530
+++ em-folder-tree.c 2005-08-11 13:15:56.133601072 +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_type_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_type_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_type_flags & CAMEL_FOLDER_TYPE_MASK) == 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]