aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author4 <NotZed@Ximian.com>2001-10-05 03:19:26 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-05 03:19:26 +0800
commitc413bd3b56597b5635d861a30727109e773d8176 (patch)
treed73fbf57b17ff0cdc4d899eaef1d5aae64bd04e4
parentc89b64cbc36ccc491fcc145880db6c0a0b56518d (diff)
downloadgsoc2013-evolution-c413bd3b56597b5635d861a30727109e773d8176.tar
gsoc2013-evolution-c413bd3b56597b5635d861a30727109e773d8176.tar.gz
gsoc2013-evolution-c413bd3b56597b5635d861a30727109e773d8176.tar.bz2
gsoc2013-evolution-c413bd3b56597b5635d861a30727109e773d8176.tar.lz
gsoc2013-evolution-c413bd3b56597b5635d861a30727109e773d8176.tar.xz
gsoc2013-evolution-c413bd3b56597b5635d861a30727109e773d8176.tar.zst
gsoc2013-evolution-c413bd3b56597b5635d861a30727109e773d8176.zip
Do the url fragment/path -> folder name hack. Removing vfolders from shell
2001-10-04 <NotZed@Ximian.com> * component-factory.c (storage_remove_folder): Do the url fragment/path -> folder name hack. Removing vfolders from shell works now? svn path=/trunk/; revision=13416
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/component-factory.c38
2 files changed, 17 insertions, 27 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index b733e5131a..6b9e583940 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-04 <NotZed@Ximian.com>
+
+ * component-factory.c (storage_remove_folder): Do the url
+ fragment/path -> folder name hack. Removing vfolders from shell
+ works now?
+
2001-10-03 <NotZed@Ximian.com>
* mail-send-recv.c (build_dialogue): Only build destination data
diff --git a/mail/component-factory.c b/mail/component-factory.c
index bec7eb70c5..74fac2b39f 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -944,11 +944,9 @@ storage_remove_folder (EvolutionStorage *storage,
{
CamelStore *store = user_data;
CamelURL *url = NULL;
- /*CamelFolderInfo *fi;*/
+ char *name;
CamelException ex;
- /* FIXME: Jeff does this look right? */
-
g_warning ("storage_remove_folder: path=\"%s\"; uri=\"%s\"", path, physical_uri);
if (!path || !physical_uri || !strncmp (physical_uri, "vtrash:", 7)) {
@@ -969,32 +967,23 @@ storage_remove_folder (EvolutionStorage *storage,
}
camel_exception_init (&ex);
-#if 0
- fi = camel_store_get_folder_info (store, url->path + 1,
- CAMEL_STORE_FOLDER_INFO_FAST, &ex);
- camel_url_free (url);
- 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_delete_folder (store, fi->full_name, &ex);
-
- camel_store_free_folder_info (store, fi);
-#else
-
+
+ if (url->fragment)
+ name = url->fragment;
+ else if (url->path && url->path[0])
+ name = url->path+1;
+ else
+ name = "";
+
if (camel_store_supports_subscriptions (store))
- camel_store_unsubscribe_folder (store, url->path + 1, NULL);
+ camel_store_unsubscribe_folder (store, name, NULL);
- camel_store_delete_folder (store, url->path + 1, &ex);
+ camel_store_delete_folder (store, name, &ex);
camel_url_free (url);
if (camel_exception_is_set (&ex))
goto exception;
-#endif
-
evolution_storage_removed_folder (storage, path);
notify_listener (listener, GNOME_Evolution_Storage_OK);
@@ -1003,11 +992,6 @@ storage_remove_folder (EvolutionStorage *storage,
exception:
/* FIXME: do better than this... */
camel_exception_clear (&ex);
-#if 0
- if (fi)
- camel_store_free_folder_info (store, fi);
-#endif
-
notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI);
}