aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree-model.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2008-01-28 11:41:49 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2008-01-28 11:41:49 +0800
commit0d3da13635b50c5ab26d121c7dfe939713cc2f91 (patch)
tree4cf8c9642d7788a74342fcfd63499aa160985450 /mail/em-folder-tree-model.c
parentc7235d29c634f57ae7caf832484fb7a6d9f5861f (diff)
downloadgsoc2013-evolution-0d3da13635b50c5ab26d121c7dfe939713cc2f91.tar.gz
gsoc2013-evolution-0d3da13635b50c5ab26d121c7dfe939713cc2f91.tar.zst
gsoc2013-evolution-0d3da13635b50c5ab26d121c7dfe939713cc2f91.zip
** Fix for bug #511488
2008-01-24 Srinivasa Ragavan <sragavan@novell.com> ** Fix for bug #511488 * em-folder-tree-model.c: (em_folder_tree_model_signal_block): * em-folder-tree-model.h: Function to block folder-created function. * mail-vfolder.c: (vfolder_load_storage): Block the signal handler when loading. svn path=/trunk/; revision=34905
Diffstat (limited to 'mail/em-folder-tree-model.c')
-rw-r--r--mail/em-folder-tree-model.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index b394279d1b..7d174e8fbc 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -851,6 +851,23 @@ em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, con
gtk_tree_path_free (path);
}
+void
+em_folder_tree_model_signal_block (EMFolderTreeModel *model, CamelStore *store, gboolean block)
+{
+ struct _EMFolderTreeModelStoreInfo *si;
+
+ si = g_hash_table_lookup (model->store_hash, store);
+ if (!si)
+ return;
+
+ if (block) {
+ if (si->created_id)
+ camel_object_unhook_event (store, "folder_created", CAMEL_CALLBACK (folder_created_cb), model);
+ si->created_id = 0;
+ } else {
+ si->created_id = camel_object_hook_event (store, "folder_created", CAMEL_CALLBACK (folder_created_cb), model);
+ }
+}
static void
em_folder_tree_model_remove_uri (EMFolderTreeModel *model, const char *uri)