diff options
author | 5 <NotZed@Ximian.com> | 2001-09-15 16:13:41 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-09-15 16:13:41 +0800 |
commit | c2a0bf66ba4970b4a5afb29cfbadeaabbea88d4f (patch) | |
tree | 0ea489e0281c231fa922ffee00dca120b6f4a9af /mail/mail-tools.c | |
parent | 07a40707a39c663f06893a5cba36d49ed63ba5b6 (diff) | |
download | gsoc2013-evolution-c2a0bf66ba4970b4a5afb29cfbadeaabbea88d4f.tar.gz gsoc2013-evolution-c2a0bf66ba4970b4a5afb29cfbadeaabbea88d4f.tar.zst gsoc2013-evolution-c2a0bf66ba4970b4a5afb29cfbadeaabbea88d4f.zip |
Major rewrite of most of the guts, handle changes based on signals and
2001-09-15 <NotZed@Ximian.com>
* 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 <NotZed@Ximian.com>
* 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 <NotZed@Ximian.com>
* 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
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r-- | mail/mail-tools.c | 46 |
1 files changed, 22 insertions, 24 deletions
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)) { |