aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-02-25 00:43:09 +0800
committerDan Winship <danw@src.gnome.org>2000-02-25 00:43:09 +0800
commit4ec5c4b998528e2854aa52cbaf107e5b6f22ee6e (patch)
treeecbe56a984d8c4e96ebf41b80742ac0b5ad0bb45 /camel/providers
parent55e6218d5907cc9f27ad81a15d750e7c3d2d5d75 (diff)
downloadgsoc2013-evolution-4ec5c4b998528e2854aa52cbaf107e5b6f22ee6e.tar
gsoc2013-evolution-4ec5c4b998528e2854aa52cbaf107e5b6f22ee6e.tar.gz
gsoc2013-evolution-4ec5c4b998528e2854aa52cbaf107e5b6f22ee6e.tar.bz2
gsoc2013-evolution-4ec5c4b998528e2854aa52cbaf107e5b6f22ee6e.tar.lz
gsoc2013-evolution-4ec5c4b998528e2854aa52cbaf107e5b6f22ee6e.tar.xz
gsoc2013-evolution-4ec5c4b998528e2854aa52cbaf107e5b6f22ee6e.tar.zst
gsoc2013-evolution-4ec5c4b998528e2854aa52cbaf107e5b6f22ee6e.zip
Move "separator" from camel-store to camel-folder, since it can vary from
location to location in an IMAP store. Rename CamelFolder::init_with_store to init and add parent_folder, name, and separator arguments. svn path=/trunk/; revision=1919
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c11
-rw-r--r--camel/providers/mbox/camel-mbox-store.c10
2 files changed, 10 insertions, 11 deletions
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
index 593f5699eb..5b8d182838 100644
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ b/camel/providers/mbox/camel-mbox-folder.c
@@ -349,7 +349,6 @@ _set_name (CamelFolder *folder, const gchar *name, CamelException *ex)
const gchar *root_dir_path;
//gchar *full_name;
//const gchar *parent_full_name;
- gchar separator;
CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxFolder::set_name\n");
@@ -361,17 +360,15 @@ _set_name (CamelFolder *folder, const gchar *name, CamelException *ex)
g_free (mbox_folder->folder_dir_path);
g_free (mbox_folder->index_file_path);
- separator = camel_store_get_separator (folder->parent_store, ex);
root_dir_path = camel_mbox_store_get_toplevel_dir (CAMEL_MBOX_STORE(folder->parent_store));
CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::set_name full_name is %s\n", folder->full_name);
CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::set_name root_dir_path is %s\n", root_dir_path);
- CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::separator is %c\n", separator);
- mbox_folder->folder_file_path = g_strdup_printf ("%s%c%s", root_dir_path, separator, folder->full_name);
- mbox_folder->summary_file_path = g_strdup_printf ("%s%c%s-ev-summary", root_dir_path, separator, folder->full_name);
- mbox_folder->folder_dir_path = g_strdup_printf ("%s%c%s.sdb", root_dir_path, separator, folder->full_name);
- mbox_folder->index_file_path = g_strdup_printf ("%s%c%s.ibex", root_dir_path, separator, folder->full_name);
+ mbox_folder->folder_file_path = g_strdup_printf ("%s/%s", root_dir_path, folder->full_name);
+ mbox_folder->summary_file_path = g_strdup_printf ("%s/%s-ev-summary", root_dir_path, folder->full_name);
+ mbox_folder->folder_dir_path = g_strdup_printf ("%s/%s.sdb", root_dir_path, folder->full_name);
+ mbox_folder->index_file_path = g_strdup_printf ("%s/%s.ibex", root_dir_path, folder->full_name);
CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::set_name mbox_folder->folder_file_path is %s\n",
mbox_folder->folder_file_path);
diff --git a/camel/providers/mbox/camel-mbox-store.c b/camel/providers/mbox/camel-mbox-store.c
index 76ceed282a..d0eea3f996 100644
--- a/camel/providers/mbox/camel-mbox-store.c
+++ b/camel/providers/mbox/camel-mbox-store.c
@@ -52,10 +52,8 @@ camel_mbox_store_class_init (CamelMboxStoreClass *camel_mbox_store_class)
static void
camel_mbox_store_init (gpointer object, gpointer klass)
{
- CamelStore *store = CAMEL_STORE (object);
CamelService *service = CAMEL_SERVICE (object);
- store->separator = '/';
service->url_flags = CAMEL_SERVICE_URL_NEED_PATH;
}
@@ -112,8 +110,12 @@ _get_folder (CamelStore *store, const gchar *folder_name, CamelException *ex)
new_mbox_folder = gtk_type_new (CAMEL_MBOX_FOLDER_TYPE);
new_folder = CAMEL_FOLDER (new_mbox_folder);
- CF_CLASS (new_folder)->init_with_store (new_folder, store, ex);
- CF_CLASS (new_folder)->set_name (new_folder, folder_name, ex);
+ /* XXX We shouldn't be passing NULL here, but it's equivalent to
+ * what was there before, and there's no
+ * CamelMboxFolder::get_subfolder yet anyway...
+ */
+ CF_CLASS (new_folder)->init (new_folder, store, NULL,
+ folder_name, '/', ex);
CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxStore::get_folder\n");