aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-local.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-02-27 01:35:53 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-02-27 01:35:53 +0800
commit1aba985def3755dbc5f9c49caee5207aa80e5d94 (patch)
tree50ad64786a1169f633570823af53f4176cf90135 /mail/mail-local.c
parent4b098b1a425fc966c96a61c1c24acb2a2f5645a9 (diff)
downloadgsoc2013-evolution-1aba985def3755dbc5f9c49caee5207aa80e5d94.tar
gsoc2013-evolution-1aba985def3755dbc5f9c49caee5207aa80e5d94.tar.gz
gsoc2013-evolution-1aba985def3755dbc5f9c49caee5207aa80e5d94.tar.bz2
gsoc2013-evolution-1aba985def3755dbc5f9c49caee5207aa80e5d94.tar.lz
gsoc2013-evolution-1aba985def3755dbc5f9c49caee5207aa80e5d94.tar.xz
gsoc2013-evolution-1aba985def3755dbc5f9c49caee5207aa80e5d94.tar.zst
gsoc2013-evolution-1aba985def3755dbc5f9c49caee5207aa80e5d94.zip
Re-add the mail_vtrash_create() hack back in for LocalStores since there's
2001-02-25 Jeffrey Stedfast <fejj@ximian.com> * component-factory.c (owner_set_cb): Re-add the mail_vtrash_create() hack back in for LocalStores since there's no better way to register a vTrash folder on the Local Storage yet. * mail-local.c (register_folder_registered): Add folders to the vTrash folder here since the LocalStore does not let the parent CamelStore class keep it's own hash of the folders. svn path=/trunk/; revision=8391
Diffstat (limited to 'mail/mail-local.c')
-rw-r--r--mail/mail-local.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/mail/mail-local.c b/mail/mail-local.c
index f27778aaac..4d2a7e0615 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -49,6 +49,7 @@
#include "evolution-storage-listener.h"
#include "camel/camel.h"
+#include "camel/camel-vee-folder.h"
#include "filter/vfolder-context.h"
#include "filter/vfolder-rule.h"
@@ -119,7 +120,7 @@ load_metainfo(const char *path)
xmlFreeDoc(doc);
return meta;
-dodefault:
+ dodefault:
meta->format = g_strdup("mbox"); /* defaults */
meta->name = g_strdup("mbox");
meta->indexed = TRUE;
@@ -324,7 +325,8 @@ get_folder (CamelStore *store, const char *folder_name,
camel_object_ref (CAMEL_OBJECT (folder));
} else {
folder = NULL;
- camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER, "No such folder %s", folder_name);
+ camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
+ "No such folder %s", folder_name);
}
return folder;
}
@@ -507,11 +509,20 @@ register_folder_registered(struct _mail_msg *mm)
int unread;
if (local_folder->folder) {
- g_hash_table_insert (local_folder->local_store->folders, local_folder->uri + 8, local_folder);
-
+ CamelStore *store = CAMEL_STORE (local_folder->local_store);
+
+ g_hash_table_insert (local_folder->local_store->folders, local_folder->uri + 8,
+ local_folder);
+
+ /* Add the folder to the vTrash folder */
+ if (store->vtrash)
+ camel_vee_folder_add_folder (CAMEL_VEE_FOLDER (store->vtrash),
+ local_folder->folder);
+
unread = local_folder->last_unread;
local_folder->last_unread = 0;
- local_folder_changed (CAMEL_OBJECT (local_folder->folder), GINT_TO_POINTER (unread), local_folder);
+ local_folder_changed (CAMEL_OBJECT (local_folder->folder), GINT_TO_POINTER (unread),
+ local_folder);
m->local_folder = NULL;
}
}