xfce4-clipman-settings doesn't read xfconf first
When opening the settings menu, all buttons and values are shown in their default state as opposed to the actual state stored in xfconf. This is caused by lines 84, 87, 112, 114, 123, 128 and 130 in panel-plugin/xfce4-clipman-settings.c
To fix this, each of those calls to gtk_toggle_button_set_active
, gtk_switch_set_state
and gtk_spin_button_set_value
should be preceded by calls to xfconf_channel_get_*
, to read the proper value from the XfconfChannel. This function takes a default parameter, which can be set to the DEFAULT_* macros.
An example:
gboolean skip_action_on_key_down;
skip_action_on_key_down = xfconf_channel_get_boolean(xfconf_channel, "/tweaks/skip-action-on-key-down", DEFAULT_SKIP_ACTION_ON_KEY_DOWN);
/* The following are lines 128 and 130 in panel-plugin/xfce4-clipman-settings.c */
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "skip-action-1")), skip_action_on_key_down);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "skip-action-2")), !skip_action_on_key_down);