diff options
author | 0 <NotZed@Ximian.com> | 2001-09-21 06:59:11 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-09-21 06:59:11 +0800 |
commit | 586f083c3ab79ada76433afbe8529050f2cd5e31 (patch) | |
tree | 68dd993b932f67783ded7d00bd3e998ab5804dd2 /mail/mail-ops.c | |
parent | a6aba35df1c77772c1417354a68a310f90944ced (diff) | |
download | gsoc2013-evolution-586f083c3ab79ada76433afbe8529050f2cd5e31.tar gsoc2013-evolution-586f083c3ab79ada76433afbe8529050f2cd5e31.tar.gz gsoc2013-evolution-586f083c3ab79ada76433afbe8529050f2cd5e31.tar.bz2 gsoc2013-evolution-586f083c3ab79ada76433afbe8529050f2cd5e31.tar.lz gsoc2013-evolution-586f083c3ab79ada76433afbe8529050f2cd5e31.tar.xz gsoc2013-evolution-586f083c3ab79ada76433afbe8529050f2cd5e31.tar.zst gsoc2013-evolution-586f083c3ab79ada76433afbe8529050f2cd5e31.zip |
Lock around hashtable/list manipulation. Also dont try scan vfolder_hash
2001-09-20 <NotZed@Ximian.com>
* mail-vfolder.c (vfolder_register_source): Lock around
hashtable/list manipulation. Also dont try scan vfolder_hash if
it hasn't been setup yet.
(source_finalise): Lock around list access.
(rule_changed): Lock around hash access.
(context_rule_added): Lock around hash access.
(context_rule_removed): "
(rule_changed): Lock around list access.
* mail-local.c (storage_listener_startup): Fix for api change.
(local_storage_new_folder_cb): Dont skip over leading / in path.
(local_storage_removed_folder_cb): ditto.
* mail-folder-cache.c (create_folders): No longer pass prefix
between recursive calls - we have the path in the folderinfo.
(setup_folder): No longer take path arg, we get it from
folderinfo.
(mail_note_folder): No longer take path arg, we use
folder->full_name to key the folder table.
(mail_note_store): Consolidate note_store interface, pass storage
or corba_storage to it.
(mail_note_local_store): Removed.
* mail-ops.c
(add_unmatched_info): Scan for unmatched name and re-title.
svn path=/trunk/; revision=13023
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index a29f19a896..a9f300baad 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -36,6 +36,7 @@ #include <camel/camel-mime-filter-from.h> #include <camel/camel-operation.h> #include <camel/camel-vtrash-folder.h> +#include <camel/camel-vee-store.h> #include "mail.h" #include "mail-tools.h" #include "mail-ops.h" @@ -1097,13 +1098,29 @@ add_vtrash_info (CamelStore *store, CamelFolderInfo *info) /* Fill in the new fields */ vtrash->full_name = g_strdup (U_("Trash")); - vtrash->name = g_strdup (U_("Trash")); + vtrash->name = g_strdup(vtrash->full_name); vtrash->url = g_strdup_printf ("vtrash:%s", uri); vtrash->unread_message_count = -1; + vtrash->path = g_strdup_printf("/%s", vtrash->name); g_free (uri); } static void +add_unmatched_info(CamelFolderInfo *fi) +{ + for (; fi->sibling; fi = fi->sibling) { + if (!strcmp(fi->full_name, CAMEL_UNMATCHED_NAME)) { + printf("renaming unmatched!\n"); + g_free(fi->name); + fi->name = g_strdup(U_("Unmatched")); + g_free(fi->path); + fi->path = g_strdup_printf("/%s", fi->name); + break; + } + } +} + +static void get_folderinfo_get (struct _mail_msg *mm) { struct _get_folderinfo_msg *m = (struct _get_folderinfo_msg *)mm; @@ -1113,8 +1130,12 @@ get_folderinfo_get (struct _mail_msg *mm) flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED; m->info = camel_store_get_folder_info (m->store, NULL, flags, &mm->ex); - if (m->info && m->info->url && (m->store->flags & CAMEL_STORE_VTRASH)) - add_vtrash_info (m->store, m->info); + if (m->info) { + if (m->info->url && (m->store->flags & CAMEL_STORE_VTRASH)) + add_vtrash_info(m->store, m->info); + if (CAMEL_IS_VEE_STORE(m->store)) + add_unmatched_info(m->info); + } } static void |