Re: [evolution-patches] 57114, camel trash problems in connector
- From: Dan Winship <danw novell com>
- To: Not Zed <notzed ximian com>
- Cc: evolution-patches ximian com
- Subject: Re: [evolution-patches] 57114, camel trash problems in connector
- Date: Wed, 26 May 2004 11:17:01 -0400
On Wed, 2004-05-26 at 09:46 +0800, Not Zed wrote:
>
> I think a cleaner way would be to do this:
OK, new patch attached
> The original code was supposed to abstract the trash name to be the
> same thing regardless of what it physically is - connector was
> supposed to do that.
But it doesn't behave the same way as it does in the rest of Evolution,
so it makes more sense to show its real name and be consistent with
Outlook/OWA. At any rate, this is how it was in 1.4 and things worked
fine.
> Some of the other code assumes this is the case (in the mailer), so
> it will break some minor things if it isn't. e.g. trash icon, e.g.
> translation of trash folder name, etc. So keep that in mind what
> these changes break or complicate.
The older code uses (folder->folder_flags & CAMEL_FOLDER_IS_TRASH). It
looks like only em-folder-tree.c uses CAMEL_VTRASH_NAME.
-- Dan
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.2150
diff -u -r1.2150 ChangeLog
--- ChangeLog 26 May 2004 15:00:49 -0000 1.2150
+++ ChangeLog 26 May 2004 15:10:19 -0000
@@ -1,3 +1,12 @@
+2004-05-26 Dan Winship <danw novell com>
+
+ * camel-store.c (camel_store_get_trash): If the store is not a
+ vtrash store, just invoke the virtual method. (In particular,
+ don't assume that the trash folder's name is CAMEL_VTRASH_NAME).
+ If it is a vtrash store, just let camel_store_get_folder() do the
+ work since it's duplicated there anyway. #57114
+ (camel_store_get_junk): Likewise.
+
2004-05-25 Sivaiah nallagatla <snallagatla novell com>
* providers/groupwise/came;-gw-listener.c (add_addressbook_sources):
set port property on e-source
Index: camel-store.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-store.c,v
retrieving revision 1.152
diff -u -r1.152 camel-store.c
--- camel-store.c 26 May 2004 04:24:01 -0000 1.152
+++ camel-store.c 26 May 2004 15:10:19 -0000
@@ -587,26 +587,10 @@
CamelFolder *
camel_store_get_trash (CamelStore *store, CamelException *ex)
{
- CamelFolder *folder;
-
- /* TODO: This is quite redundant, since get_folder(CAMEL_VTRASH_NAME) does the same */
-
- if ((store->flags & CAMEL_STORE_VTRASH) == 0
- || store->folders == NULL)
- return NULL;
-
- folder = camel_object_bag_reserve(store->folders, CAMEL_VTRASH_NAME);
- if (!folder) {
- folder = CS_CLASS(store)->get_trash(store, ex);
-
- if (folder) {
- camel_object_bag_add(store->folders, CAMEL_VTRASH_NAME, folder);
- camel_object_trigger_event(store, "folder_opened", folder);
- } else
- camel_object_bag_abort(store->folders, CAMEL_VTRASH_NAME);
- }
-
- return folder;
+ if ((store->flags & CAMEL_STORE_VTRASH) == 0)
+ return CS_CLASS(store)->get_trash(store, ex);
+ else
+ return camel_store_get_folder(store, CAMEL_VTRASH_NAME, 0, ex);
}
/**
@@ -620,26 +604,10 @@
CamelFolder *
camel_store_get_junk (CamelStore *store, CamelException *ex)
{
- CamelFolder *folder;
-
- /* TODO: This is quite redundant, since get_folder(CAMEL_VJUNK_NAME) does the same */
-
- if ((store->flags & CAMEL_STORE_VJUNK) == 0
- || store->folders == NULL)
- return NULL;
-
- folder = camel_object_bag_reserve(store->folders, CAMEL_VJUNK_NAME);
- if (!folder) {
- folder = CS_CLASS(store)->get_junk(store, ex);
-
- if (folder) {
- camel_object_bag_add(store->folders, CAMEL_VJUNK_NAME, folder);
- camel_object_trigger_event(store, "folder_opened", folder);
- } else
- camel_object_bag_abort(store->folders, CAMEL_VJUNK_NAME);
- }
-
- return folder;
+ if ((store->flags & CAMEL_STORE_VJUNK) == 0)
+ return CS_CLASS(store)->get_junk(store, ex);
+ else
+ return camel_store_get_folder(store, CAMEL_VJUNK_NAME, 0, ex);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]