aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-local.c
diff options
context:
space:
mode:
author8 <NotZed@Ximian.com>2001-09-29 07:54:30 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-09-29 07:54:30 +0800
commit4b14db5520cf99cb30d39e14c2bb38071d4cad2d (patch)
tree54fa8819aa23d242cccd69a3ed365e69a690bee6 /mail/mail-local.c
parentf1eb4aa8cf71a6e690eb76e00a3d5111035931b6 (diff)
downloadgsoc2013-evolution-4b14db5520cf99cb30d39e14c2bb38071d4cad2d.tar
gsoc2013-evolution-4b14db5520cf99cb30d39e14c2bb38071d4cad2d.tar.gz
gsoc2013-evolution-4b14db5520cf99cb30d39e14c2bb38071d4cad2d.tar.bz2
gsoc2013-evolution-4b14db5520cf99cb30d39e14c2bb38071d4cad2d.tar.lz
gsoc2013-evolution-4b14db5520cf99cb30d39e14c2bb38071d4cad2d.tar.xz
gsoc2013-evolution-4b14db5520cf99cb30d39e14c2bb38071d4cad2d.tar.zst
gsoc2013-evolution-4b14db5520cf99cb30d39e14c2bb38071d4cad2d.zip
Emit folder_deleted event. (remove_find_path): Fix, compare against path,
2001-09-28 <NotZed@Ximian.com> * mail-local.c (mail_local_store_remove_folder): Emit folder_deleted event. (remove_find_path): Fix, compare against path, not full_name. * mail-tools.c (mail_tool_uri_to_folder): Dont vfolder_register_source anymore. * mail-vfolder.c (rule_changed): Changed to access mail_fodler_cahce to find out if the folder exist yet before trying to open them, also use the cache as a cache so we dont have to open the folder if its already been opened. (vfolder_register_source, register_source): Removed. (source_finalise): Removed, (check_source): Removed. All handled through diff mechanism. (mail_vfolder_add_uri): New function, records uri's of available folders, and adds them to any active vfolders if required. (mail_vfolder_remove_uri): New function, removes a uri from available folders, and checks any rules to see fi they need updating. (vfolder_adduri): New async function to add a uri to all vfolders that need it. (store_folder_deleted): oops! free user, not rule!! * mail-folder-cache.c: Add uri->folderinfo hashtable, and the store from which they come into the store info struct. Add uri to the folder_info. (setup_folder): Store the uri in the folderinfo. (setup_folder): And the uri in the folder_uri hashtable. (mail_note_store): Store the store in the storeinfo, and setup the folders_uri hashtable via the store's hash functions. (setup_folder): Call mail_vfolder_add_uri to note this newly setup folder uri. (store_folder_deleted): Proxy call to main thread. (real_folder_deleted): And tell the vfolder to remove this uri from its folder list. (setup_folder): Dont call vfolder_add_uri if noselect is set on the uri. 2001-09-27 <NotZed@Ximian.com> * mail-vfolder.c: Removed vfolder_info struct, vfolder_storage. Neither used anymore. svn path=/trunk/; revision=13242
Diffstat (limited to 'mail/mail-local.c')
-rw-r--r--mail/mail-local.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mail/mail-local.c b/mail/mail-local.c
index 6af58a87e2..5fbb457543 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -858,7 +858,7 @@ struct _search_info {
static void
remove_find_path(char *uri, CamelFolderInfo *info, struct _search_info *data)
{
- if (!strcmp(info->full_name, data->path))
+ if (!strcmp(info->path, data->path))
data->info = info;
}
@@ -870,14 +870,18 @@ static void mail_local_store_remove_folder(MailLocalStore *mls, const char *path
LOCAL_STORE_LOCK(mls);
g_hash_table_foreach(mls->folder_infos, (GHFunc)remove_find_path, &data);
- if (data.info) {
+ if (data.info)
g_hash_table_remove(mls->folder_infos, data.info->url);
+ LOCAL_STORE_UNLOCK(mls);
+
+ if (data.info) {
+ camel_object_trigger_event((CamelObject *)mls, "folder_deleted", data.info);
+
g_free(data.info->url);
g_free(data.info->full_name);
g_free(data.info->name);
g_free(data.info);
}
- LOCAL_STORE_UNLOCK(mls);
}
/* ** Local Provider ************************************************************** */