diff options
author | Vincent Untz <vuntz@gnome.org> | 2006-01-06 20:15:20 +0000 |
---|---|---|
committer | Vincent Untz <vuntz@src.gnome.org> | 2006-01-06 20:15:20 +0000 |
commit | 612790331f9024401c4eac94b440f2b9d93b1007 (patch) | |
tree | 94c90e3459dfb26c80f8163746d805848da521ac | |
parent | 346f66ca1791a9f52f6f7d8633fbad2c81df7ef1 (diff) | |
download | gconf-612790331f9024401c4eac94b440f2b9d93b1007.tar.gz |
new, clears a cache entry if it matches the directory
2006-01-06 Vincent Untz <vuntz@gnome.org>
* gconf/gconf-client.c: (clear_dir_cache_foreach): new, clears a cache
entry if it matches the directory
(gconf_client_real_remove_dir): remove from cache all entries that are
in this directory
Fix bug #127285.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | gconf/gconf-client.c | 16 |
2 files changed, 24 insertions, 0 deletions
@@ -1,3 +1,11 @@ +2006-01-06 Vincent Untz <vuntz@gnome.org> + + * gconf/gconf-client.c: (clear_dir_cache_foreach): new, clears a cache + entry if it matches the directory + (gconf_client_real_remove_dir): remove from cache all entries that are + in this directory + Fix bug #127285. + 2005-12-30 Abel Cheung <maddog@linuxhall.org> * configure.in: Added "is" "zh_HK" to ALL_LINGUAS. diff --git a/gconf/gconf-client.c b/gconf/gconf-client.c index e183e78e..2572f6bc 100644 --- a/gconf/gconf-client.c +++ b/gconf/gconf-client.c @@ -644,6 +644,18 @@ foreach_add_notifies(gpointer key, gpointer value, gpointer user_data) } } +static gboolean +clear_dir_cache_foreach (char* key, GConfEntry* entry, char *dir) +{ + if (gconf_key_is_below (dir, key)) + { + gconf_entry_free (entry); + return TRUE; + } + else + return FALSE; +} + static void gconf_client_real_remove_dir (GConfClient* client, Dir* d, @@ -667,6 +679,10 @@ gconf_client_real_remove_dir (GConfClient* client, d->notify_id = 0; } + g_hash_table_foreach_remove (client->cache_hash, + (GHRFunc)clear_dir_cache_foreach, + d->name); + dir_destroy(d); ad.client = client; |