aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog4
-rw-r--r--e-util/e-config-listener.c21
-rw-r--r--e-util/e-config-listener.h2
3 files changed, 27 insertions, 0 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 3cb13b194c..860df087f5 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,7 @@
+2002-12-10 Rodrigo Moya <rodrigo@ximian.com>
+
+ * e-config-listener.[ch] (e_config_listener_remove_dir): new function.
+
2002-12-09 Jeffrey Stedfast <fejj@ximian.com>
* e-trie.c: New implementation of an Aho-Corasick trie.
diff --git a/e-util/e-config-listener.c b/e-util/e-config-listener.c
index ed57bf8cdc..5d676985ad 100644
--- a/e-util/e-config-listener.c
+++ b/e-util/e-config-listener.c
@@ -560,3 +560,24 @@ e_config_listener_set_string (EConfigListener *cl, const char *key, const char *
}
}
}
+
+void
+e_config_listener_remove_dir (EConfigListener *cl, const char *dir)
+{
+ GSList *slist, *iter;
+ gchar *key;
+
+ g_return_if_fail (E_IS_CONFIG_LISTENER (cl));
+ g_return_if_fail (dir != NULL);
+
+ slist = gconf_client_all_entries (cl->priv->db, dir, NULL);
+ for (iter = slist; iter != NULL; iter = iter->next) {
+ GConfEntry *entry = iter->data;
+
+ key = gconf_entry_get_key (entry);
+ gconf_client_unset (cl->priv->db, key, NULL);
+ gconf_entry_free (entry);
+ }
+
+ g_slist_free (slist);
+}
diff --git a/e-util/e-config-listener.h b/e-util/e-config-listener.h
index efae269c36..d9829a7d27 100644
--- a/e-util/e-config-listener.h
+++ b/e-util/e-config-listener.h
@@ -70,6 +70,8 @@ void e_config_listener_set_string (EConfigListener *cl,
const char *key,
const char *value);
+void e_config_listener_remove_dir (EConfigListener *cl, const char *dir);
+
G_END_DECLS
#endif