aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--filter/ChangeLog6
-rw-r--r--filter/filter-driver.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog
index 27436d31b1..492a730ee3 100644
--- a/filter/ChangeLog
+++ b/filter/ChangeLog
@@ -1,5 +1,11 @@
2000-07-02 Dan Winship <danw@helixcode.com>
+ * filter-driver.c (open_folder): freeze the folder to avoid
+ multiple folder_changed's
+ (close_folder): and thaw it.
+
+2000-07-02 Dan Winship <danw@helixcode.com>
+
* filter-driver.c (filter_driver_new): kill
filter_driver_set_session and filter_driver_set_rules and instead
make filter_driver_new take the rules and a callback function it
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;
}