summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-12-04 23:48:23 +0200
committerJasmine Hassan <[email protected]>2012-12-05 04:27:48 +0200
commit4006c217f458e936d77683b5974600070a253bac (patch)
tree3a8e618b81d9f226f5e0ed3a2e7e91e549a92c7f
parentca7b6632c336ee7fa991ffaa8b851491d558e70b (diff)
downloadmate-settings-daemon-4006c217f458e936d77683b5974600070a253bac.tar.bz2
mate-settings-daemon-4006c217f458e936d77683b5974600070a253bac.tar.xz
[xsettings] quick 'n dirty gsettings port review continued
for reference: xsettings: Port XSettings sync to GSettings http://git.gnome.org/browse/gnome-settings-daemon/commit/?id=6d7498114930de358573e97f54880c586c9f9c66
-rw-r--r--plugins/xsettings/msd-xsettings-manager.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/xsettings/msd-xsettings-manager.c b/plugins/xsettings/msd-xsettings-manager.c
index e045711..f8291f4 100644
--- a/plugins/xsettings/msd-xsettings-manager.c
+++ b/plugins/xsettings/msd-xsettings-manager.c
@@ -659,7 +659,7 @@ gboolean
mate_xsettings_manager_start (MateXSettingsManager *manager,
GError **error)
{
- int i;
+ guint i;
GList *list, *l;
g_debug ("Starting xsettings manager");
@@ -689,6 +689,11 @@ mate_xsettings_manager_start (MateXSettingsManager *manager,
gsettings = g_hash_table_lookup (manager->priv->gsettings,
translations[i].gsettings_schema);
+ if (gsettings == NULL) {
+ g_warning ("Schemas '%s' has not been setup", translations[i].gsettings_schema);
+ continue;
+ }
+
val = g_settings_get_value (gsettings, translations[i].gsettings_key);
process_value (manager, &translations[i], val);
@@ -697,7 +702,8 @@ mate_xsettings_manager_start (MateXSettingsManager *manager,
list = g_hash_table_get_values (manager->priv->gsettings);
for (l = list; l != NULL; l = l->next) {
- g_signal_connect_object (G_OBJECT (l->data), "changed", G_CALLBACK (xsettings_callback), manager, 0);
+ g_signal_connect_object (G_OBJECT (l->data), "changed",
+ G_CALLBACK (xsettings_callback), manager, 0);
}
g_list_free (list);