From c2a0bf66ba4970b4a5afb29cfbadeaabbea88d4f Mon Sep 17 00:00:00 2001 From: 5 Date: Sat, 15 Sep 2001 08:13:41 +0000 Subject: Major rewrite of most of the guts, handle changes based on signals and 2001-09-15 * mail-vfolder.c: Major rewrite of most of the guts, handle changes based on signals and events, etc. Use the main storage handling code that imap uses, etc. * mail-tools.c (mail_tool_uri_to_folder): Dont special case vfolder: anymore. * component-factory.c (owner_set_cb): use vfolder_load_storage(), new function to setup vfolder storage, after interaction has been enabled only. This might need some tweaking ... (storage_remove_folder): Removed all the folder lookup stuff. Just delete the folder based on the path passed in. There should be no reason this wouldn't work, right? 2001-09-14 * mail-ops.c (get_folderinfo_get): Only add vtrash folder info, if store supports vtrash. * component-factory.c (mail_load_storage_by_uri): Let 'vfolder' stores show up too. 2001-09-13 * mail-vfolder.c (vfolder_uri_to_folder): Open a vfolder then set its expression, since name?query open method is removed. svn path=/trunk/; revision=12856 --- mail/mail-tools.c | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) (limited to 'mail/mail-tools.c') diff --git a/mail/mail-tools.c b/mail/mail-tools.c index 0848044b92..1cbf3163a2 100644 --- a/mail/mail-tools.c +++ b/mail/mail-tools.c @@ -333,32 +333,30 @@ mail_tool_uri_to_folder (const char *uri, CamelException *ex) if (!url) { return NULL; } - - if (!strcmp (url->protocol, "vfolder")) { - folder = vfolder_uri_to_folder (uri, ex); - } else { - store = camel_session_get_store (session, uri + offset, ex); - if (store) { - const char *name; - - /* if we have a fragment, then the path is actually used by the store, - so the fragment is the path to the folder instead */ - if (url->fragment) { - name = url->fragment; - } else { - if (url->path && *url->path) - name = url->path + 1; - else - name = ""; - } - - if (offset) - folder = camel_store_get_trash (store, ex); + + store = camel_session_get_store (session, uri + offset, ex); + if (store) { + const char *name; + + /* if we have a fragment, then the path is actually used by the store, + so the fragment is the path to the folder instead */ + if (url->fragment) { + name = url->fragment; + } else { + if (url->path && *url->path) + name = url->path + 1; else - folder = camel_store_get_folder (store, name, - CAMEL_STORE_FOLDER_CREATE, ex); - camel_object_unref (CAMEL_OBJECT (store)); + name = ""; } + + printf("opening folder '%s' on store (%p) '%s'\n", name, store, uri); + + if (offset) + folder = camel_store_get_trash (store, ex); + else + folder = camel_store_get_folder (store, name, + CAMEL_STORE_FOLDER_CREATE, ex); + camel_object_unref (CAMEL_OBJECT (store)); } if (camel_exception_is_set (ex)) { -- cgit