aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/mail-callbacks.c15
-rw-r--r--mail/mail-vtrash.c2
3 files changed, 17 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 5094dca416..e6e1a86ce0 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2001-02-20 Dan Winship <danw@ximian.com>
+
+ * mail-vtrash.c (get_trash_get): Pass NULL, not "/" for @top.
+
+ * mail-callbacks.c (create_folders): Make this work with
+ CamelStores where the separator character isn't /. folder_created
+ and folder_deleted are still broken.
+
2001-02-20 Not Zed <NotZed@Ximian.com>
* mail-vtrash.c: Include the camel-vee-store.h header from the
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index f4fa4f06cd..aa25793eaa 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -1336,7 +1336,7 @@ stop_threads(BonoboUIComponent *uih, void *user_data, const char *path)
static void
-create_folders (EvolutionStorage *storage, CamelFolderInfo *fi)
+create_folders (EvolutionStorage *storage, const char *prefix, CamelFolderInfo *fi)
{
char *name, *path;
@@ -1346,19 +1346,19 @@ create_folders (EvolutionStorage *storage, CamelFolderInfo *fi)
else
name = g_strdup (fi->name);
- path = g_strdup_printf ("/%s", fi->full_name);
+ path = g_strdup_printf ("%s/%s", prefix, fi->name);
evolution_storage_new_folder (storage, path, name,
"mail", fi->url ? fi->url : "",
fi->name, /* description */
fi->unread_message_count > 0);
g_free (name);
- g_free (path);
if (fi->child)
- create_folders (storage, fi->child);
+ create_folders (storage, path, fi->child);
+ g_free (path);
if (fi->sibling)
- create_folders (storage, fi->sibling);
+ create_folders (storage, prefix, fi->sibling);
}
void
@@ -1368,7 +1368,8 @@ folder_created (CamelStore *store, CamelFolderInfo *fi)
if ((storage = mail_lookup_storage (store))) {
if (fi)
- create_folders (storage, fi);
+ /* FIXME: this won't work. (the "prefix" is wrong) */
+ create_folders (storage, "", fi);
gtk_object_unref (GTK_OBJECT (storage));
}
@@ -1386,7 +1387,7 @@ mail_storage_create_folder (EvolutionStorage *storage, CamelStore *store, CamelF
if (storage) {
if (fi)
- create_folders (storage, fi);
+ create_folders (storage, "", fi);
if (unref)
gtk_object_unref (GTK_OBJECT (storage));
diff --git a/mail/mail-vtrash.c b/mail/mail-vtrash.c
index 15f9c54605..217a1f6eeb 100644
--- a/mail/mail-vtrash.c
+++ b/mail/mail-vtrash.c
@@ -216,7 +216,7 @@ get_trash_get (struct _mail_msg *mm)
/* Create and add this new vTrash folder */
CamelFolderInfo *info;
- info = camel_store_get_folder_info (store, "/", TRUE, TRUE, TRUE, &mm->ex);
+ info = camel_store_get_folder_info (store, NULL, TRUE, TRUE, TRUE, &mm->ex);
populate_folder_urls (info, urls);
camel_store_free_folder_info (store, info);