diff options
author | Not Zed <NotZed@Ximian.com> | 2003-06-11 12:28:04 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2003-06-11 12:28:04 +0800 |
commit | f9257aeb4c12c759b5e3419a8ae94f5b2e1a3ad6 (patch) | |
tree | 399e2f955530305301fd81cfb2612ccffb048647 /mail | |
parent | aaa0d1aba42fcaa048846c2420c069875d850915 (diff) | |
download | gsoc2013-evolution-f9257aeb4c12c759b5e3419a8ae94f5b2e1a3ad6.tar.gz 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')
-rw-r--r-- | mail/ChangeLog | 28 | ||||
-rw-r--r-- | mail/Makefile.am | 2 | ||||
-rw-r--r-- | mail/component-factory.c | 58 | ||||
-rw-r--r-- | mail/importers/Makefile.am | 2 | ||||
-rw-r--r-- | mail/mail-account-gui.c | 5 | ||||
-rw-r--r-- | mail/mail-tools.c | 28 |
6 files changed, 86 insertions, 37 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index dc1c882055..0e2c45a308 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,31 @@ +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. + 2003-06-03 Federico Mena Quintero <federico@ximian.com> * mail-search.c (mail_search_construct): Put the buttons in HIG diff --git a/mail/Makefile.am b/mail/Makefile.am index 8591af1785..344ce9f027 100644 --- a/mail/Makefile.am +++ b/mail/Makefile.am @@ -174,7 +174,7 @@ libevolution_mail_la_LDFLAGS = \ server_in_files = GNOME_Evolution_Mail.server.in.in server_DATA = $(server_in_files:.server.in.in=.server) -$(server_in_files:.server.in.in=.server.in): $(server_in_files) +%.server.in: %.server.in.in sed -e "s|\@COMPONENTDIR\@|$(componentdir)|" $< > $@ @INTLTOOL_SERVER_RULE@ 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); } diff --git a/mail/importers/Makefile.am b/mail/importers/Makefile.am index 58cbfc898d..0fde07d8fc 100644 --- a/mail/importers/Makefile.am +++ b/mail/importers/Makefile.am @@ -97,7 +97,7 @@ server_DATA = $(server_in_files:.server.in.in=.server) EXTRA_DIST = $(server_in_files) $(server_DATA) -BUILT_SOURCES = $(MAIL_GENERATED) +BUILT_SOURCES = $(MAIL_GENERATED) $(server_DATA) CLEANFILES = $(BUILT_SOURCES) diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index 880d7aaa4f..b708b93e27 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -1029,6 +1029,11 @@ extract_values (MailAccountGuiService *source, GHashTable *extra_config, CamelUR break; case CAMEL_PROVIDER_CONF_ENTRY: + if (strcmp (entries[i].name, "username") == 0 + || strcmp (entries[i].name, "hostname") == 0 + || strcmp (entries[i].name, "path") == 0) { + break; + } entry = g_hash_table_lookup (extra_config, entries[i].name); camel_url_set_param (url, entries[i].name, gtk_entry_get_text (entry)); break; diff --git a/mail/mail-tools.c b/mail/mail-tools.c index 43c67a2fb7..a0943e510b 100644 --- a/mail/mail-tools.c +++ b/mail/mail-tools.c @@ -125,27 +125,33 @@ mail_tool_get_local_movemail_path (const unsigned char *uri) return path; } -/* why is this function so stupidly complex when allthe work is done elsehwere? */ char * mail_tool_do_movemail (const char *source_url, CamelException *ex) { char *dest_path; - const char *source; struct stat sb; - - g_return_val_if_fail (strncmp (source_url, "mbox:", 5) == 0, NULL); + CamelURL *uri; + + uri = camel_url_new(source_url, ex); + if (uri == NULL) + return NULL; + + if (strcmp(uri->protocol, "mbox") != 0) { + /* FIXME: use right text here post 1.4 */ + camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID, + _("Could not parse URL `%s'"), + source_url); + camel_url_free(uri); + return NULL; + } /* Set up our destination. */ dest_path = mail_tool_get_local_movemail_path (source_url); - /* Skip over "mbox:" plus host part (if any) of url. */ - source = source_url + 5; - if (!strncmp (source, "//", 2)) - source = strchr (source + 2, '/'); - /* Movemail from source (source_url) to dest_path */ - camel_movemail (source, dest_path, ex); - + camel_movemail (uri->path, dest_path, ex); + camel_url_free(uri); + if (stat (dest_path, &sb) < 0 || sb.st_size == 0) { unlink (dest_path); /* Clean up the movemail.foo file. */ g_free (dest_path); |