diff options
author | Dan Winship <danw@src.gnome.org> | 2001-02-21 06:32:59 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-02-21 06:32:59 +0800 |
commit | 3be64e5b653331f72e2431d81336b740acbe2d97 (patch) | |
tree | 020fbeb53ac293a7c7a9ef45d4af889c8676b5c5 | |
parent | 5421d39a4744d6be9bfec771773b8f444229ead9 (diff) | |
download | gsoc2013-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
-rw-r--r-- | mail/ChangeLog | 8 | ||||
-rw-r--r-- | mail/mail-callbacks.c | 15 | ||||
-rw-r--r-- | mail/mail-vtrash.c | 2 |
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); |