diff options
author | Michael Zucci <zucchi@src.gnome.org> | 2001-09-22 04:10:58 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-09-22 04:10:58 +0800 |
commit | c55395477215d9ecf3092f3e791b80c9145f8422 (patch) | |
tree | 530f0abe528bb399eb5f278878b75514dfd19b01 /mail | |
parent | 704b38203221056b0e6e8c845e0f0ec814bdebbc (diff) | |
download | gsoc2013-evolution-c55395477215d9ecf3092f3e791b80c9145f8422.tar.gz gsoc2013-evolution-c55395477215d9ecf3092f3e791b80c9145f8422.tar.zst gsoc2013-evolution-c55395477215d9ecf3092f3e791b80c9145f8422.zip |
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
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 10 | ||||
-rw-r--r-- | mail/component-factory.c | 6 | ||||
-rw-r--r-- | mail/mail-callbacks.c | 85 | ||||
-rw-r--r-- | mail/mail-ops.c | 23 |
4 files changed, 11 insertions, 113 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index dc681c31c6..1083912a4e 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,14 @@ 2001-09-21 <NotZed@Ximian.com> + * 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-local.c (mail_local_store_add_folder): Use url path as full_name, not shell path. (mail_local_folder_construct): Remove path argument, and use the @@ -13,6 +22,7 @@ * mail-ops.c (mail_update_subfolders): Removed. Isn't used anymore. + (mail_scan_subfolders): Remove, no longer used. * mail-send-recv.c (receive_update_got_store): Remove call to mail_update_subfolders. diff --git a/mail/component-factory.c b/mail/component-factory.c index e8a6df7ef2..812225841b 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -895,11 +895,7 @@ storage_create_folder (EvolutionStorage *storage, for (fi = root; fi; fi = fi->child) camel_store_subscribe_folder (store, fi->full_name, NULL); } - - prefix = g_strndup (path, name - path - 1); - folder_created (store, prefix, root); - g_free (prefix); - + camel_store_free_folder_info (store, root); notify_listener (listener, GNOME_Evolution_Storage_OK); 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)); - } -} diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 586d57dfcf..9df8d1a634 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -1198,29 +1198,6 @@ mail_get_folderinfo (CamelStore *store, void (*done)(CamelStore *store, CamelFol return id; } -/* ********************************************************************** */ - -static void -do_scan_subfolders (CamelStore *store, CamelFolderInfo *info, void *data) -{ - EvolutionStorage *storage = data; - - if (info) { - gtk_object_set_data (GTK_OBJECT (storage), "connected", GINT_TO_POINTER (TRUE)); - mail_storage_create_folder (storage, store, info); - } -} - -/* synchronous function to scan the & and add folders in a store */ -void -mail_scan_subfolders (CamelStore *store, EvolutionStorage *storage) -{ - int id; - - id = mail_get_folderinfo (store, do_scan_subfolders, storage); - /*mail_msg_wait(id);*/ -} - /* ** ATTACH MESSAGES ****************************************************** */ struct _build_data { |