aboutsummaryrefslogtreecommitdiffstats
path: root/mail/component-factory.c
diff options
context:
space:
mode:
author5 <NotZed@Ximian.com>2001-09-15 16:13:41 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-09-15 16:13:41 +0800
commitc2a0bf66ba4970b4a5afb29cfbadeaabbea88d4f (patch)
tree0ea489e0281c231fa922ffee00dca120b6f4a9af /mail/component-factory.c
parent07a40707a39c663f06893a5cba36d49ed63ba5b6 (diff)
downloadgsoc2013-evolution-c2a0bf66ba4970b4a5afb29cfbadeaabbea88d4f.tar
gsoc2013-evolution-c2a0bf66ba4970b4a5afb29cfbadeaabbea88d4f.tar.gz
gsoc2013-evolution-c2a0bf66ba4970b4a5afb29cfbadeaabbea88d4f.tar.bz2
gsoc2013-evolution-c2a0bf66ba4970b4a5afb29cfbadeaabbea88d4f.tar.lz
gsoc2013-evolution-c2a0bf66ba4970b4a5afb29cfbadeaabbea88d4f.tar.xz
gsoc2013-evolution-c2a0bf66ba4970b4a5afb29cfbadeaabbea88d4f.tar.zst
gsoc2013-evolution-c2a0bf66ba4970b4a5afb29cfbadeaabbea88d4f.zip
Major rewrite of most of the guts, handle changes based on signals and
2001-09-15 <NotZed@Ximian.com> * 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 <NotZed@Ximian.com> * 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 <NotZed@Ximian.com> * 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
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r--mail/component-factory.c29
1 files changed, 22 insertions, 7 deletions
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);