aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog9
-rw-r--r--camel/camel-store.c48
2 files changed, 17 insertions, 40 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 6ce0c5cbd2..700f9a7d65 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -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
diff --git a/camel/camel-store.c b/camel/camel-store.c
index 042e9509da..677e92a7cb 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -587,26 +587,10 @@ get_junk(CamelStore *store, CamelException *ex)
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 @@ camel_store_get_trash (CamelStore *store, CamelException *ex)
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