From c2a0bf66ba4970b4a5afb29cfbadeaabbea88d4f Mon Sep 17 00:00:00 2001 From: 5 Date: Sat, 15 Sep 2001 08:13:41 +0000 Subject: Major rewrite of most of the guts, handle changes based on signals and 2001-09-15 * mail-vfolder.c: Major rewrite of most of the guts, handle changes based on signals and events, etc. Use the main storage handling code that imap uses, etc. * mail-tools.c (mail_tool_uri_to_folder): Dont special case vfolder: anymore. * component-factory.c (owner_set_cb): use vfolder_load_storage(), new function to setup vfolder storage, after interaction has been enabled only. This might need some tweaking ... (storage_remove_folder): Removed all the folder lookup stuff. Just delete the folder based on the path passed in. There should be no reason this wouldn't work, right? 2001-09-14 * mail-ops.c (get_folderinfo_get): Only add vtrash folder info, if store supports vtrash. * component-factory.c (mail_load_storage_by_uri): Let 'vfolder' stores show up too. 2001-09-13 * mail-vfolder.c (vfolder_uri_to_folder): Open a vfolder then set its expression, since name?query open method is removed. svn path=/trunk/; revision=12856 --- mail/component-factory.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'mail/component-factory.c') diff --git a/mail/component-factory.c b/mail/component-factory.c index 32194cc177..6a238ea2aa 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -647,7 +647,7 @@ owner_set_cb (EvolutionShellComponent *shell_component, storages_hash = g_hash_table_new (NULL, NULL); - vfolder_create_storage (shell_component); + /*vfolder_create_storage (shell_component);*/ corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)); @@ -668,6 +668,8 @@ owner_set_cb (EvolutionShellComponent *shell_component, } mail_session_enable_interaction (TRUE); + + vfolder_load_storage(corba_shell); mail_autoreceive_setup (); } @@ -900,9 +902,13 @@ storage_remove_folder (EvolutionStorage *storage, gpointer user_data) { CamelStore *store = user_data; +#if 0 CamelURL *url = NULL; CamelFolderInfo *fi; +#endif CamelException ex; + + /* FIXME: Jeff does this look right? */ g_warning ("storage_remove_folder: path=\"%s\"; uri=\"%s\"", path, physical_uri); @@ -911,12 +917,14 @@ storage_remove_folder (EvolutionStorage *storage, notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI); return; } - + +#if 0 url = camel_url_new (physical_uri, NULL); if (!url) { notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI); return; } +#endif } else { if (!*path) { notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI); @@ -925,32 +933,37 @@ storage_remove_folder (EvolutionStorage *storage, } camel_exception_init (&ex); +#if 0 fi = camel_store_get_folder_info (store, url ? url->path + 1 : path + 1, CAMEL_STORE_FOLDER_INFO_FAST, &ex); if (url) camel_url_free (url); if (camel_exception_is_set (&ex)) goto exception; - + camel_store_delete_folder (store, fi->full_name, &ex); +#endif + camel_store_delete_folder (store, path+1, &ex); if (camel_exception_is_set (&ex)) goto exception; if (camel_store_supports_subscriptions (store)) - camel_store_unsubscribe_folder (store, fi->full_name, NULL); + /*camel_store_unsubscribe_folder (store, fi->full_name, NULL);*/ + camel_store_unsubscribe_folder (store, path+1, NULL); evolution_storage_removed_folder (storage, path); - camel_store_free_folder_info (store, fi); + /*camel_store_free_folder_info (store, fi);*/ notify_listener (listener, GNOME_Evolution_Storage_OK); return; exception: /* FIXME: do better than this... */ - +#if 0 if (fi) camel_store_free_folder_info (store, fi); +#endif notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI); } @@ -1016,11 +1029,13 @@ mail_load_storage_by_uri (GNOME_Evolution_Shell shell, const char *uri, const ch * That issue can't be resolved on the provider level * -- it's a per-URL problem. * MPZ Added a hack to let spool protocol through temporarily ... + * And vfolder, and maildir ... */ if ((!(prov->flags & CAMEL_PROVIDER_IS_STORAGE) || !(prov->flags & CAMEL_PROVIDER_IS_REMOTE)) && !((strcmp (prov->protocol, "spool") == 0) - || strcmp (prov->protocol, "maildir") == 0)) + || (strcmp (prov->protocol, "maildir") == 0) + || (strcmp (prov->protocol, "vfolder") == 0))) return; store = camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, &ex); -- cgit v1.2.3