aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-06-23 05:55:14 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-06-23 05:55:14 +0800
commitafa7176eab5a2c495a8f10de4c430f443cdcfb99 (patch)
tree59be2ee4a647cc55f83ee2ac46cb50ede25b5b2a
parenta7f40b2f5ff709b9c0d3f5f487cdba6d6d3aa7b6 (diff)
downloadgsoc2013-evolution-afa7176eab5a2c495a8f10de4c430f443cdcfb99.tar.gz
gsoc2013-evolution-afa7176eab5a2c495a8f10de4c430f443cdcfb99.tar.zst
gsoc2013-evolution-afa7176eab5a2c495a8f10de4c430f443cdcfb99.zip
Updated to prepend url-> path if it exists for that imap store.
2000-06-22 Jeffrey Stedfast <fejj@helixcode.com> * folder-browser.c (folder_browser_load_folder): Updated to prepend url-> path if it exists for that imap store. * component-factory.c (create_imap_storage): Modified to not prepend a hard-coded namespace. svn path=/trunk/; revision=3701
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/component-factory.c2
-rw-r--r--mail/folder-browser.c29
3 files changed, 29 insertions, 11 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 08f7ed9499..c6f34b0486 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2000-06-22 Jeffrey Stedfast <fejj@helixcode.com>
+
+ * folder-browser.c (folder_browser_load_folder): Updated to
+ prepend url-> path if it exists for that imap store.
+
+ * component-factory.c (create_imap_storage): Modified to not
+ prepend a hard-coded namespace.
+
2000-06-22 Chris Toshok <toshok@helixcode.com>
* mail-ops.c (fetch_mail_cleanup): new function, passed as arg to
@@ -53,6 +61,7 @@
UI-friendly name.
(dispatch_func): Free the saved prettyname.
+>>>>>>> 1.221
2000-06-21 Christopher James Lahey <clahey@helixcode.com>
* message-list.c: Removed an erroneous comment.
diff --git a/mail/component-factory.c b/mail/component-factory.c
index bea11d4029..5337a5e6f9 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -324,7 +324,7 @@ create_imap_storage (EvolutionShellComponent *shell_component)
char *path, *buf;
path = g_strdup_printf ("/%s", (char *)lsub->pdata[i]);
- buf = g_strdup_printf ("%s/mail%s", source, path);
+ buf = g_strdup_printf ("%s/%s", source, path);
g_print ("Adding %s\n", path);
evolution_storage_new_folder (storage, path, "mail", buf, "description");
}
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 6a90b23b30..b880a867b6 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -64,10 +64,10 @@ folder_browser_load_folder (FolderBrowser *fb, const char *name)
ex = camel_exception_new ();
- if (!strncmp(name, "vfolder:", 8)) {
+ if (!strncmp (name, "vfolder:", 8)) {
char *query, *newquery;
- store_name = g_strdup(name);
- query = strchr(store_name, '?');
+ store_name = g_strdup (name);
+ query = strchr (store_name, '?');
if (query) {
*query++ = 0;
} else {
@@ -92,15 +92,15 @@ folder_browser_load_folder (FolderBrowser *fb, const char *name)
if (st) {
source_folder = camel_store_get_folder (st, "mbox", FALSE, ex);
if (source_folder) {
- camel_vee_folder_add_folder(new_folder, source_folder);
+ camel_vee_folder_add_folder (new_folder, source_folder);
}
}
}
}
- g_free(newquery);
- g_free(store_name);
+ g_free (newquery);
+ g_free (store_name);
- } else if (!strncmp(name, "imap:", 5)) {
+ } else if (!strncmp (name, "imap:", 5)) {
/* uhm, I'm just guessing here - this code might be wrong */
char *service, *ptr;
@@ -113,16 +113,25 @@ folder_browser_load_folder (FolderBrowser *fb, const char *name)
store = camel_session_get_store (session, service, ex);
g_free (service);
if (store) {
+ CamelURL *url = CAMEL_SERVICE (store)->url;
char *folder_name;
- for (ptr = name + 7; *ptr && *ptr != '/'; ptr++);
+ for (ptr = (char *)(name + 7); *ptr && *ptr != '/'; ptr++);
if (*ptr == '/') {
- folder_name = ptr + 1;
+ if (url && url->path) {
+ fprintf (stderr, "namespace = %s\n", url->path);
+ ptr += strlen (url->path);
+ }
+
+ ptr++;
+ folder_name = g_strdup (ptr);
+
fprintf (stderr, "getting folder: %s\n", folder_name);
new_folder = camel_store_get_folder (store, folder_name, TRUE, ex);
+ g_free (folder_name);
}
}
- } else if (!strncmp(name, "file:", 5)) {
+ } else if (!strncmp (name, "file:", 5)) {
/* Change "file:" to "mbox:". */
store_name = g_strdup_printf ("mbox:%s", name + 5);
store = camel_session_get_store (session, store_name, ex);