Commit ba2c121c authored by Sebastian Keller's avatar Sebastian Keller Committed by Bastien Nocera

xsettings: fix some settings not being updated after recent glib change

GSettings got changed to only emit the "changed" signal after get_value
has been called at least once since connecting to the "changed" signal
in order to prevent unnecessary work in some cases. The g-s-d xsettings
plugin however was getting all values before connecting to the "changed"
signal and thus the signal was not emitted for some of the settings,
like the wm button-layout. Other settings (like the interface settings)
were fine due to additional get_value calls after setting up the signal
callback. Fix this by moving the moving the loop that gets all initial
values after the connect calls.

See also:
https://git.gnome.org/browse/glib/commit/?id=8ff5668a458344da22d30491e3ce726d861b3619

https://bugzilla.gnome.org/show_bug.cgi?id=745135
parent 82c14c55
......@@ -1233,6 +1233,12 @@ gnome_xsettings_manager_start (GnomeXSettingsManager *manager,
(* fixed->func) (manager, fixed);
}
list = g_hash_table_get_values (manager->priv->settings);
for (l = list; l != NULL; l = l->next) {
g_signal_connect_object (G_OBJECT (l->data), "changed", G_CALLBACK (xsettings_callback), manager, 0);
}
g_list_free (list);
for (i = 0; i < G_N_ELEMENTS (translations); i++) {
GVariant *val;
GSettings *settings;
......@@ -1250,12 +1256,6 @@ gnome_xsettings_manager_start (GnomeXSettingsManager *manager,
g_variant_unref (val);
}
list = g_hash_table_get_values (manager->priv->settings);
for (l = list; l != NULL; l = l->next) {
g_signal_connect_object (G_OBJECT (l->data), "changed", G_CALLBACK (xsettings_callback), manager, 0);
}
g_list_free (list);
/* Plugin settings (GTK modules and Xft) */
manager->priv->plugin_settings = g_settings_new (XSETTINGS_PLUGIN_SCHEMA);
g_signal_connect_object (manager->priv->plugin_settings, "changed", G_CALLBACK (plugin_callback), manager, 0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment