aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree-model.c
diff options
context:
space:
mode:
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)