aboutsummaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-07-03 09:20:28 +0800
committerDan Winship <danw@src.gnome.org>2000-07-03 09:20:28 +0800
commit5158267d36179b60c8995a78ab05308e39abb52b (patch)
tree645c6be5295241aa34ba17c20da6841fd5a575b6 /filter
parent03b3618408f037589882655e4b97e7b75787b756 (diff)
downloadgsoc2013-evolution-5158267d36179b60c8995a78ab05308e39abb52b.tar.gz
gsoc2013-evolution-5158267d36179b60c8995a78ab05308e39abb52b.tar.zst
gsoc2013-evolution-5158267d36179b60c8995a78ab05308e39abb52b.zip
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
Diffstat (limited to 'filter')
-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;
}