From bd1a57fc80b824adef52020b9b45b7810f1dad35 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 22 Jan 2001 18:47:01 +0000 Subject: Function to add a store/storage mapping. (add_storage): Use it. * component-factory.c (mail_hash_storage): Function to add a store/storage mapping. (add_storage): Use it. * mail-vfolder.c (vfolder_uri_to_folder): Use the vfolder name rather than the string "mbox" (which wasn't ever used for anything) in the vfolder URL. (Combined with the CamelVeeFolder change, this makes camel_folder_get_name() return a pretty name for vfolders now.) Call mail_hash_storage() to record the CamelVeeStore/vfolder_storage mapping. (Ideally, there'd only be a single CamelVeeStore... this is just a quick hack.) vfolders now display their unread count once you've looked at them once. svn path=/trunk/; revision=7712 --- mail/component-factory.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'mail/component-factory.c') diff --git a/mail/component-factory.c b/mail/component-factory.c index 6e2d4b69db..38a71b8596 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -315,8 +315,7 @@ add_storage (const char *name, const char *uri, CamelService *store, switch (res) { case EVOLUTION_STORAGE_OK: - g_hash_table_insert (storages_hash, store, storage); - camel_object_ref (CAMEL_OBJECT (store)); + mail_hash_storage (store, storage); mail_scan_subfolders (CAMEL_STORE (store), storage); /* falllll */ case EVOLUTION_STORAGE_ERROR_ALREADYREGISTERED: @@ -401,6 +400,13 @@ mail_load_storages (GNOME_Evolution_Shell shell, const GSList *sources, gboolean } } +void +mail_hash_storage (CamelService *store, EvolutionStorage *storage) +{ + camel_object_ref (CAMEL_OBJECT (store)); + g_hash_table_insert (storages_hash, store, storage); +} + EvolutionStorage* mail_lookup_storage (CamelStore *store) { -- cgit v1.2.3