From 613c4f1ce37ff136540cb0daf76c53b1b8a7a7b9 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 1 Jul 2002 04:56:35 +0000 Subject: Removed. The folder's deleted event isn't needed since we're listening to 2002-07-01 Not Zed * mail-folder-cache.c (folder_deleted): Removed. The folder's deleted event isn't needed since we're listening to the store's folder_deleted signal. Also, the code was wrong, it cleared the folder without disconnecting events, etc. See #16486, and probably others. (mail_note_folder): Dont hook onto deleted anymore. (unset_folder_info): Or unhook from it. svn path=/trunk/; revision=17331 --- mail/mail-folder-cache.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'mail/mail-folder-cache.c') diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 4ceb61b16a..8b55601f7a 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -227,7 +227,6 @@ unset_folder_info(struct _folder_info *mfi, int delete) camel_object_unhook_event((CamelObject *)folder, "folder_changed", folder_changed, mfi); camel_object_unhook_event((CamelObject *)folder, "message_changed", folder_changed, mfi); - camel_object_unhook_event((CamelObject *)folder, "deleted", folder_deleted, mfi); camel_object_unhook_event((CamelObject *)folder, "renamed", folder_renamed, mfi); camel_object_unhook_event((CamelObject *)folder, "finalize", folder_finalised, mfi); } @@ -392,17 +391,6 @@ folder_finalised(CamelObject *o, gpointer event_data, gpointer user_data) UNLOCK(info_lock); } -static void -folder_deleted(CamelObject *o, gpointer event_data, gpointer user_data) -{ - struct _folder_info *mfi = user_data; - - d(printf("Folder deleted '%s'!\n", ((CamelFolder *)o)->full_name)); - LOCK(info_lock); - mfi->folder = NULL; - UNLOCK(info_lock); -} - static void folder_renamed(CamelObject *o, gpointer event_data, gpointer user_data) { @@ -454,7 +442,6 @@ void mail_note_folder(CamelFolder *folder) camel_object_hook_event((CamelObject *)folder, "folder_changed", folder_changed, mfi); camel_object_hook_event((CamelObject *)folder, "message_changed", folder_changed, mfi); - camel_object_hook_event((CamelObject *)folder, "deleted", folder_deleted, mfi); camel_object_hook_event((CamelObject *)folder, "renamed", folder_renamed, mfi); camel_object_hook_event((CamelObject *)folder, "finalize", folder_finalised, mfi); @@ -494,7 +481,7 @@ store_folder_unsubscribed(CamelObject *o, void *event_data, void *data) struct _folder_info *mfi; CamelStore *store = (CamelStore *)o; - d(printf("Folder deleted: %s\n", fi->full_name)); + d(printf("Store Folder deleted: %s\n", fi->full_name)); LOCK(info_lock); si = g_hash_table_lookup(stores, store); -- cgit