From 2dd7fb3a1413ca901729a6fe977c9ceab99d7478 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Tue, 10 Dec 2002 17:03:03 +0000 Subject: new function. 2002-12-10 Rodrigo Moya * e-config-listener.[ch] (e_config_listener_remove_dir): new function. svn path=/trunk/; revision=19086 --- e-util/e-config-listener.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'e-util/e-config-listener.c') 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); +} -- cgit