aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-02-21 06:32:59 +0800
committerDan Winship <danw@src.gnome.org>2001-02-21 06:32:59 +0800
commit3be64e5b653331f72e2431d81336b740acbe2d97 (patch)
tree020fbeb53ac293a7c7a9ef45d4af889c8676b5c5 /mail/mail-callbacks.c
parent5421d39a4744d6be9bfec771773b8f444229ead9 (diff)
downloadgsoc2013-evolution-3be64e5b653331f72e2431d81336b740acbe2d97.tar.gz
gsoc2013-evolution-3be64e5b653331f72e2431d81336b740acbe2d97.tar.zst
gsoc2013-evolution-3be64e5b653331f72e2431d81336b740acbe2d97.zip
Pass NULL, not "/" for @top.
* 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. svn path=/trunk/; revision=8306
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c15
1 files changed, 8 insertions, 7 deletions
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));