aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2004-05-27 21:48:58 +0800
committerDan Winship <danw@src.gnome.org>2004-05-27 21:48:58 +0800
commitf0398d66abfaa55ed49ab3309377aa1afd309f2b (patch)
tree1b748e6e29d0ef647f168a33aaeca88926ac7349 /camel
parent9f71f4b5d33b6798bacf2fe74bd72f6e5d7f758d (diff)
downloadgsoc2013-evolution-f0398d66abfaa55ed49ab3309377aa1afd309f2b.tar.gz
gsoc2013-evolution-f0398d66abfaa55ed49ab3309377aa1afd309f2b.tar.zst
gsoc2013-evolution-f0398d66abfaa55ed49ab3309377aa1afd309f2b.zip
If the store is not a vtrash store, just invoke the virtual method. (In
* 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. svn path=/trunk/; revision=26110
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