From c55395477215d9ecf3092f3e791b80c9145f8422 Mon Sep 17 00:00:00 2001 From: Michael Zucci Date: Fri, 21 Sep 2001 20:10:58 +0000 Subject: All made redundant by new mail-folder-cache code. (delete_folders, * mail-callbacks.c (mail_storage_create_folder, folder_created, create_folders): All made redundant by new mail-folder-cache code. (delete_folders, folder_deleted): Uh, code that isn't used anywhere. Removed. * component-factory.c (storage_create_folder): Dont call folder_created, let the folder_created event handle the update. * mail-ops.c (mail_scan_subfolders): Remove, no longer used. svn path=/trunk/; revision=13059 --- mail/mail-callbacks.c | 85 --------------------------------------------------- 1 file changed, 85 deletions(-) (limited to 'mail/mail-callbacks.c') diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 816f973ae3..02a2ce9da3 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -2260,88 +2260,3 @@ empty_trash (BonoboUIComponent *uih, void *user_data, const char *path) camel_exception_clear (&ex); } - -static void -create_folders (EvolutionStorage *storage, const char *prefix, CamelFolderInfo *fi) -{ - char *path; - - path = g_strdup_printf ("%s/%s", prefix, fi->name); - - if (!strncmp (fi->url, "vtrash:", 7)) - evolution_storage_new_folder (storage, path, fi->name, - "vtrash", fi->url, - fi->name, /* description */ - fi->unread_message_count); - else - evolution_storage_new_folder (storage, path, fi->name, - "mail", fi->url, - fi->name, /* description */ - fi->unread_message_count); - - if (fi->child) - create_folders (storage, path, fi->child); - g_free (path); - - if (fi->sibling) - create_folders (storage, prefix, fi->sibling); -} - -void -folder_created (CamelStore *store, const char *prefix, CamelFolderInfo *root) -{ - EvolutionStorage *storage; - - if ((storage = mail_lookup_storage (store))) { - create_folders (storage, prefix, root); - bonobo_object_unref (BONOBO_OBJECT (storage)); - } -} - -void -mail_storage_create_folder (EvolutionStorage *storage, CamelStore *store, CamelFolderInfo *fi) -{ - gboolean unref = FALSE; - - if (!storage && store) { - storage = mail_lookup_storage (store); - unref = TRUE; - } - - if (storage) { - if (fi) - create_folders (storage, "", fi); - - if (unref) - bonobo_object_unref (BONOBO_OBJECT (storage)); - } -} - -static void -delete_folders (EvolutionStorage *storage, CamelFolderInfo *fi) -{ - char *path; - - if (fi->child) - delete_folders (storage, fi->child); - - path = g_strdup_printf ("/%s", fi->full_name); - evolution_storage_removed_folder (storage, path); - g_free (path); - - if (fi->sibling) - delete_folders (storage, fi->sibling); -} - -void -folder_deleted (CamelStore *store, CamelFolderInfo *fi) -{ - EvolutionStorage *storage; - - if ((storage = mail_lookup_storage (store))) { - if (fi) - delete_folders (storage, fi); - - bonobo_object_unref (BONOBO_OBJECT (storage)); - } -} -- cgit v1.2.3