cache: Fix uncached value (Fixes #35)
Reproducer for #35 (closed):
static void
property_changed (XfconfChannel *channel,
char *property,
GValue *value,
gpointer user_data)
{
xfconf_channel_set_bool (channel, "/show-sidebar", TRUE);
g_main_loop_quit (user_data);
}
static void
set_property (gpointer data)
{
xfconf_channel_reset_property (data, "/show-sidebar", TRUE);
xfconf_channel_get_bool (data, "/show-sidebar", TRUE);
xfconf_channel_set_bool (data, "/show-sidebar", TRUE);
}
gint main (gint argc, gchar **argv)
{
xfconf_init (NULL);
GMainLoop *loop = g_main_loop_new (NULL, FALSE);
XfconfChannel *channel = xfconf_channel_get ("catfish");
g_signal_connect (channel, "property-changed", G_CALLBACK (property_changed), loop);
g_idle_add_once (set_property, channel);
g_main_loop_run (loop);
g_main_loop_unref (loop);
xfconf_shutdown ();
}