diff options
author | 8 <NotZed@Ximian.com> | 2001-10-28 13:10:56 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-10-28 13:10:56 +0800 |
commit | 78b66af8ce96ab41e476d3ebf36cd85fced6d781 (patch) | |
tree | 271e7655e09c1a0a89798739e941d519765cfaa9 /camel/camel-store.c | |
parent | b1d36fe27d0434b98176a670ca67e64e5d4bb11e (diff) | |
download | gsoc2013-evolution-78b66af8ce96ab41e476d3ebf36cd85fced6d781.tar.gz gsoc2013-evolution-78b66af8ce96ab41e476d3ebf36cd85fced6d781.tar.zst gsoc2013-evolution-78b66af8ce96ab41e476d3ebf36cd85fced6d781.zip |
Use path not protocol as the path part of the uri of the folder_created
2001-10-28 <NotZed@Ximian.com>
* providers/local/camel-local-folder.c
(camel_local_folder_construct): Use path not protocol as the path
part of the uri of the folder_created event.
* providers/local/camel-maildir-store.c (scan_dir): If FAST is
set, dont try and scan for unread counts.
* providers/local/camel-local-store.c (create_folder): Implement,
just return the folderinfo of the folder matched, not all of it.
* camel-store.c (camel_store_rename_folder): Rename the
camelfolders before emitting the folderchanged event (otherwise
vstore fails to pick up change.
* camel-store.c (camel_store_init): Always use a default dir_sep
of '/'.
* camel-store.h (struct _CamelStore): Added a dir_sep to the base
store so rename and whatnot can work, temporary fix for mixed dir
separator in folder name api's.
* providers/imap/camel-map-store.c:
(imap_connect_online): Also set the store's dir_sep here.
(imap_connect_offline): "
svn path=/trunk/; revision=14275
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r-- | camel/camel-store.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c index c6ffdcdaae..c993c74fee 100644 --- a/camel/camel-store.c +++ b/camel/camel-store.c @@ -122,6 +122,8 @@ camel_store_init (void *o) /* set vtrash on by default */ store->flags = CAMEL_STORE_VTRASH; + + store->dir_sep = '/'; store->priv = g_malloc0 (sizeof (*store->priv)); #ifdef ENABLE_THREADS @@ -433,17 +435,6 @@ camel_store_rename_folder (CamelStore *store, const char *old_name, const char * guint32 flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE; CamelRenameInfo reninfo; - /* Emit changed signal */ - if (store->flags & CAMEL_STORE_SUBSCRIPTIONS) - flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED; - - reninfo.old_base = (char *)old_name; - reninfo.new = ((CamelStoreClass *)((CamelObject *)store)->classfuncs)->get_folder_info(store, new_name, flags, ex); - if (info.new != NULL) { - camel_object_trigger_event(CAMEL_OBJECT(store), "folder_renamed", &reninfo); - ((CamelStoreClass *)((CamelObject *)store)->classfuncs)->free_folder_info(store, reninfo.new); - } - CAMEL_STORE_LOCK(store, cache_lock); for (i=0;i<info.folders->len;i++) { char *new; @@ -464,6 +455,17 @@ camel_store_rename_folder (CamelStore *store, const char *old_name, const char * camel_object_unref((CamelObject *)folder); } CAMEL_STORE_UNLOCK(store, cache_lock); + + /* Emit changed signal */ + if (store->flags & CAMEL_STORE_SUBSCRIPTIONS) + flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED; + + reninfo.old_base = (char *)old_name; + reninfo.new = ((CamelStoreClass *)((CamelObject *)store)->classfuncs)->get_folder_info(store, new_name, flags, ex); + if (info.new != NULL) { + camel_object_trigger_event(CAMEL_OBJECT(store), "folder_renamed", &reninfo); + ((CamelStoreClass *)((CamelObject *)store)->classfuncs)->free_folder_info(store, reninfo.new); + } } else { /* Failed, just unlock our folders for re-use */ for (i=0;i<info.folders->len;i++) { |