diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-02-25 04:08:43 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-02-25 04:08:43 +0800 |
commit | 0ce50d4fdc52664c830b244ae875ff387cac4ecb (patch) | |
tree | a41680c533a1bf5e0e59f2668a1225fe6784acc2 /mail | |
parent | bef47a636432fe5791649412cf1a936b2c2b186b (diff) | |
download | gsoc2013-evolution-0ce50d4fdc52664c830b244ae875ff387cac4ecb.tar gsoc2013-evolution-0ce50d4fdc52664c830b244ae875ff387cac4ecb.tar.gz gsoc2013-evolution-0ce50d4fdc52664c830b244ae875ff387cac4ecb.tar.bz2 gsoc2013-evolution-0ce50d4fdc52664c830b244ae875ff387cac4ecb.tar.lz gsoc2013-evolution-0ce50d4fdc52664c830b244ae875ff387cac4ecb.tar.xz gsoc2013-evolution-0ce50d4fdc52664c830b244ae875ff387cac4ecb.tar.zst gsoc2013-evolution-0ce50d4fdc52664c830b244ae875ff387cac4ecb.zip |
No longer need to construct the vTrash here. (owner_set_cb): Don't make
2001-02-24 Jeffrey Stedfast <fejj@ximian.com>
* component-factory.c (mail_load_storages): No longer need to
construct the vTrash here.
(owner_set_cb): Don't make the vTrash for the local store here.
* mail-ops.c (add_vtrash_info): New function to add a vTrash
folder info to a pre-constructed CamelFolderInfo for use in the
get_folder_info async function.
svn path=/trunk/; revision=8381
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 10 | ||||
-rw-r--r-- | mail/component-factory.c | 6 | ||||
-rw-r--r-- | mail/mail-ops.c | 37 |
3 files changed, 46 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 1dd0f0a163..f0f6748eeb 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,13 @@ +2001-02-24 Jeffrey Stedfast <fejj@ximian.com> + + * component-factory.c (mail_load_storages): No longer need to + construct the vTrash here. + (owner_set_cb): Don't make the vTrash for the local store here. + + * mail-ops.c (add_vtrash_info): New function to add a vTrash + folder info to a pre-constructed CamelFolderInfo for use in the + get_folder_info async function. + 2001-02-23 Jeffrey Stedfast <fejj@ximian.com> * main.c (main): No longer need to do a vtrash_cleanup() (it also diff --git a/mail/component-factory.c b/mail/component-factory.c index 94945c8ad1..9fdfd0b3cd 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -43,7 +43,6 @@ #include "mail-mt.h" #include "mail-importer.h" #include "mail-vfolder.h" /* vfolder_create_storage */ -#include "mail-vtrash.h" #include "openpgp-utils.h" #include <gal/widgets/e-gui-utils.h> @@ -216,8 +215,6 @@ owner_set_cb (EvolutionShellComponent *shell_component, g_free (uri); } - mail_vtrash_create ("file:/", _("vTrash")); - mail_session_enable_interaction (TRUE); mail_autoreceive_setup (); @@ -442,9 +439,6 @@ mail_load_storages (GNOME_Evolution_Shell shell, const GSList *sources, gboolean g_warning ("Cannot load storage: %s", camel_exception_get_description (&ex)); camel_exception_clear (&ex); - } else { - /* add the vTrash folder */ - mail_vtrash_add (CAMEL_STORE (store), service->url, _("vTrash")); } } diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 6a68cbd6be..947bba4a9d 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -924,12 +924,47 @@ static char *get_folderinfo_desc(struct _mail_msg *mm, int done) return ret; } +static void +add_vtrash_info (CamelFolderInfo *info) +{ + CamelFolderInfo *fi, *vtrash; + CamelURL *url; + char *uri; + + if (!info) + return; + + for (fi = info; fi->sibling; fi = fi->sibling) { + if (!strcmp (fi->name, "vTrash")) + return; + } + + /* create our vTrash URL */ + url = camel_url_new (info->url, NULL); + g_free (url->path); + url->path = g_strdup ("vTrash"); + uri = camel_url_to_string (url, FALSE); + camel_url_free (url); + + vtrash = g_new0 (CamelFolderInfo, 1); + vtrash->full_name = g_strdup ("vTrash"); + vtrash->name = g_strdup ("vTrash"); + vtrash->url = g_strdup_printf ("vtrash:%s", uri); + vtrash->unread_message_count = -1; + g_free (uri); + + vtrash->parent = fi; + + fi->sibling = vtrash; +} + static void get_folderinfo_get(struct _mail_msg *mm) { struct _get_folderinfo_msg *m = (struct _get_folderinfo_msg *)mm; - + camel_operation_register(mm->cancel); m->info = camel_store_get_folder_info(m->store, NULL, FALSE, TRUE, TRUE, &mm->ex); + add_vtrash_info (m->info); camel_operation_unregister(mm->cancel); } |