[gnome-settings-daemon] xsettings: fix some settings not being updated after recent glib change
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] xsettings: fix some settings not being updated after recent glib change
- Date: Wed, 25 Feb 2015 17:30:21 +0000 (UTC)
commit ba2c121cbcca3e2d2a7b85723ca66287bbb99df5
Author: Sebastian Keller <sebastian-keller gmx de>
Date: Wed Feb 25 00:09:40 2015 +0100
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
plugins/xsettings/gsd-xsettings-manager.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/plugins/xsettings/gsd-xsettings-manager.c b/plugins/xsettings/gsd-xsettings-manager.c
index 1ec4e08..3357e02 100644
--- a/plugins/xsettings/gsd-xsettings-manager.c
+++ b/plugins/xsettings/gsd-xsettings-manager.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]