aboutsummaryrefslogtreecommitdiffstats
path: root/mail/folder-browser.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-07-17 11:46:26 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-17 11:46:26 +0800
commit237f2dc92b27da3e11c2ea4fcea7b45f7196f583 (patch)
tree950dd4cd042a6fa26179923de3705560d6e9fadb /mail/folder-browser.c
parent93a122c7e3a2e4507527b745d9864275c305736d (diff)
downloadgsoc2013-evolution-237f2dc92b27da3e11c2ea4fcea7b45f7196f583.tar
gsoc2013-evolution-237f2dc92b27da3e11c2ea4fcea7b45f7196f583.tar.gz
gsoc2013-evolution-237f2dc92b27da3e11c2ea4fcea7b45f7196f583.tar.bz2
gsoc2013-evolution-237f2dc92b27da3e11c2ea4fcea7b45f7196f583.tar.lz
gsoc2013-evolution-237f2dc92b27da3e11c2ea4fcea7b45f7196f583.tar.xz
gsoc2013-evolution-237f2dc92b27da3e11c2ea4fcea7b45f7196f583.tar.zst
gsoc2013-evolution-237f2dc92b27da3e11c2ea4fcea7b45f7196f583.zip
Initial code to support IMAP folders that don't use "/" as a directory
2000-07-16 Jeffrey Stedfast <fejj@helixcode.com> * folder-browser.c, component-factory.c: Initial code to support IMAP folders that don't use "/" as a directory separator. svn path=/trunk/; revision=4185
Diffstat (limited to 'mail/folder-browser.c')
-rw-r--r--mail/folder-browser.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 925feb4303..9268c65df8 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -61,7 +61,7 @@ CamelFolder *
mail_uri_to_folder (const char *name)
{
char *store_name, *msg;
- CamelStore *store;
+ CamelStore *store = NULL;
CamelFolder *folder = NULL;
CamelException *ex;
@@ -91,6 +91,7 @@ mail_uri_to_folder (const char *name)
source_name = g_strdup_printf ("file://%s/local/Inbox", evolution_dir);
source_folder = mail_uri_to_folder (source_name);
g_free (source_name);
+#warning "Not Good (tm). It might be better to have some sort of high level Camel interface for this"
if (source_folder)
camel_vee_folder_add_folder (folder, source_folder);
}
@@ -105,11 +106,15 @@ mail_uri_to_folder (const char *name)
for (ptr = service + 7; *ptr && *ptr != '/'; ptr++);
ptr++;
*ptr = '\0';
+
store = camel_session_get_store (session, service, ex);
g_free (service);
+
if (store) {
CamelURL *url = CAMEL_SERVICE (store)->url;
- char *folder_name;
+ char *tree_name, *folder_name, *dir_sep;
+
+ /*dir_sep = CAMEL_IMAP_STORE (store)->dir_sep;*/
for (ptr = (char *)(name + 7); *ptr && *ptr != '/'; ptr++);
if (*ptr == '/') {
@@ -124,6 +129,8 @@ mail_uri_to_folder (const char *name)
/*for ( ; *ptr && *ptr == '/'; ptr++);*/
folder_name = g_strdup (ptr);
+ /*tree_name = g_strdup (ptr);*/
+ /*folder_name = e_strreplace (tree_name, "/", dir_sep);*/
folder = camel_store_get_folder (store, folder_name, TRUE, ex);
g_free (folder_name);