2
* test_gconf_recursive.c -- Test utility for recursively unsetting a gconf dir.
4
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
* Johannes H. Jensen <joh@pseudoberries.com>
25
#include <gconf/gconf-client.h>
29
notify (GConfClient *client,
34
g_debug ("notify (%p, %d, %p, %p)", client, cnxn_id, entry, user_data);
37
g_debug ("\t%s = %p", entry->key, entry->value);
47
GMainLoop *loop = g_main_loop_new(g_main_context_default(), FALSE);
49
client = gconf_client_get_default();
51
gconf_client_add_dir (client, "/apps/atest",
52
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
53
gconf_client_notify_add (client, "/apps/atest", notify, NULL, NULL, NULL);
55
result = gconf_client_recursive_unset (client, "/apps/atest/foo", GCONF_UNSET_INCLUDING_SCHEMA_NAMES, &err);
57
g_debug ("result: %d", result);
58
g_debug ("err: %p", err);
60
gconf_client_suggest_sync (client, &err);
62
g_debug ("result: %d", result);
63
g_debug ("err: %p", err);
65
g_main_loop_run (loop);
67
//result = gconf_client_unset (client, "/apps/atest/fooz", &err);
68
//result = gconf_client_
70
/*g_debug ("result: %d", result);
71
g_debug ("err: %p", err);*/
b'\\ No newline at end of file'