From 5158267d36179b60c8995a78ab05308e39abb52b Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 3 Jul 2000 01:20:28 +0000 Subject: freeze the folder to avoid multiple folder_changed's (close_folder): and * filter-driver.c (open_folder): freeze the folder to avoid multiple folder_changed's (close_folder): and thaw it. svn path=/trunk/; revision=3864 --- filter/ChangeLog | 6 ++++++ filter/filter-driver.c | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/filter/ChangeLog b/filter/ChangeLog index 27436d31b1..492a730ee3 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,9 @@ +2000-07-02 Dan Winship + + * filter-driver.c (open_folder): freeze the folder to avoid + multiple folder_changed's + (close_folder): and thaw it. + 2000-07-02 Dan Winship * filter-driver.c (filter_driver_new): kill diff --git a/filter/filter-driver.c b/filter/filter-driver.c index 7b3f361b4a..e706558252 100644 --- a/filter/filter-driver.c +++ b/filter/filter-driver.c @@ -458,8 +458,10 @@ open_folder(FilterDriver *d, const char *folder_url) return camelfolder; camelfolder = p->fetcher(folder_url); - if (camelfolder) + if (camelfolder) { g_hash_table_insert(p->folders, g_strdup(folder_url), camelfolder); + camel_folder_freeze(camelfolder); + } return camelfolder; } @@ -475,6 +477,7 @@ close_folder(void *key, void *value, void *data) g_free(key); camel_folder_sync(f, FALSE, p->ex); + camel_folder_thaw(f); gtk_object_unref((GtkObject *)f); } @@ -526,6 +529,7 @@ filter_driver_run(FilterDriver *d, CamelFolder *source, CamelFolder *inbox) p->processed = g_hash_table_new(g_str_hash, g_str_equal); camel_exception_init(p->ex); + camel_folder_freeze(inbox); options = p->options; while (options) { @@ -598,6 +602,7 @@ filter_driver_run(FilterDriver *d, CamelFolder *source, CamelFolder *inbox) g_hash_table_destroy(p->terminated); close_folders(d); g_hash_table_destroy(p->folders); + camel_folder_thaw(inbox); return 0; } -- cgit