aboutsummaryrefslogtreecommitdiffstats
path: root/mail/component-factory.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-06-11 12:28:04 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-06-11 12:28:04 +0800
commitf9257aeb4c12c759b5e3419a8ae94f5b2e1a3ad6 (patch)
tree399e2f955530305301fd81cfb2612ccffb048647 /mail/component-factory.c
parentaaa0d1aba42fcaa048846c2420c069875d850915 (diff)
downloadgsoc2013-evolution-f9257aeb4c12c759b5e3419a8ae94f5b2e1a3ad6.tar
gsoc2013-evolution-f9257aeb4c12c759b5e3419a8ae94f5b2e1a3ad6.tar.gz
gsoc2013-evolution-f9257aeb4c12c759b5e3419a8ae94f5b2e1a3ad6.tar.bz2
gsoc2013-evolution-f9257aeb4c12c759b5e3419a8ae94f5b2e1a3ad6.tar.lz
gsoc2013-evolution-f9257aeb4c12c759b5e3419a8ae94f5b2e1a3ad6.tar.xz
gsoc2013-evolution-f9257aeb4c12c759b5e3419a8ae94f5b2e1a3ad6.tar.zst
gsoc2013-evolution-f9257aeb4c12c759b5e3419a8ae94f5b2e1a3ad6.zip
** See bug #22542
2003-06-11 Not Zed <NotZed@Ximian.com> ** See bug #22542 * component-factory.c (storage_create_folder): If we're creating a folder on a vstore, popup a vFolder editor rather than failing. 2003-06-05 Not Zed <NotZed@Ximian.com> ** Part of #42691. * importers/Makefile.am (BUILT_SOURCES): added server_DATA. * Makefile.am (%.server.in): create a proper implicit rule for temporary .in file. 2003-06-04 Not Zed <NotZed@Ximian.com> ** See bug #43974 * mail-tools.c (mail_tool_do_movemail): use a proper CamelURL to decode the uri, not hacky strcmp stuff. * mail-account-gui.c (extract_values): if we have an conf_entry, ignore username, hostname, and path ones, as these are handled implicitly in the url itself. Came about because of the fix for #42838. svn path=/trunk/; revision=21407
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r--mail/component-factory.c58
1 files changed, 34 insertions, 24 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 20f618e660..639382fc5f 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -32,6 +32,7 @@
#include <gconf/gconf-client.h>
#include <camel/camel.h>
+#include <camel/camel-vee-store.h>
#include <bonobo/bonobo-generic-factory.h>
#include <bonobo/bonobo-shlib-factory.h>
@@ -219,7 +220,7 @@ create_folder (EvolutionShellComponent *shell_component,
CORBA_Environment ev;
CORBA_exception_init (&ev);
-
+
if (type_is_mail (type)) {
mail_get_folder (physical_uri, CAMEL_STORE_FOLDER_CREATE, create_folder_done,
CORBA_Object_duplicate (listener, &ev), mail_thread_new);
@@ -1143,7 +1144,7 @@ storage_create_folder (EvolutionStorage *storage,
CamelException ex;
/* We could just use 'path' always here? */
-
+
if (!type_is_mail (type)) {
notify_listener (listener, GNOME_Evolution_Storage_UNSUPPORTED_TYPE);
return;
@@ -1155,33 +1156,42 @@ storage_create_folder (EvolutionStorage *storage,
return;
}
name++;
-
- camel_exception_init (&ex);
- if (*parent_physical_uri) {
- url = camel_url_new (parent_physical_uri, NULL);
- if (!url) {
- notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI);
+
+ /* we can not directly create folders on a vfolder store, so fudge it */
+ if (CAMEL_IS_VEE_STORE(store)) {
+ VfolderRule *rule;
+ rule = vfolder_rule_new();
+
+ filter_rule_set_name((FilterRule *)rule, path+1);
+ vfolder_gui_add_rule(rule);
+ } else {
+ camel_exception_init (&ex);
+ if (*parent_physical_uri) {
+ url = camel_url_new (parent_physical_uri, NULL);
+ if (!url) {
+ notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI);
+ return;
+ }
+
+ root = camel_store_create_folder (store, url->fragment?url->fragment:url->path + 1, name, &ex);
+ camel_url_free (url);
+ } else
+ root = camel_store_create_folder (store, NULL, name, &ex);
+
+ if (camel_exception_is_set (&ex)) {
+ notify_listener_exception(listener, &ex);
+ camel_exception_clear (&ex);
return;
}
-
- root = camel_store_create_folder (store, url->fragment?url->fragment:url->path + 1, name, &ex);
- camel_url_free (url);
- } else
- root = camel_store_create_folder (store, NULL, name, &ex);
- if (camel_exception_is_set (&ex)) {
- notify_listener_exception(listener, &ex);
- camel_exception_clear (&ex);
- return;
- }
+ if (camel_store_supports_subscriptions (store)) {
+ for (fi = root; fi; fi = fi->child)
+ camel_store_subscribe_folder (store, fi->full_name, NULL);
+ }
- if (camel_store_supports_subscriptions (store)) {
- for (fi = root; fi; fi = fi->child)
- camel_store_subscribe_folder (store, fi->full_name, NULL);
+ camel_store_free_folder_info (store, root);
}
-
- camel_store_free_folder_info (store, root);
-
+
notify_listener (listener, GNOME_Evolution_Storage_OK);
}