Skip to content
Snippets Groups Projects

cache: Fix uncached value (Fixes #35)

Merged Gaël Bonithon requested to merge Tamaranch/xfconf:fix-uncached-value into master

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 ();
}

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading