From 4006c217f458e936d77683b5974600070a253bac Mon Sep 17 00:00:00 2001 From: Jasmine Hassan Date: Tue, 4 Dec 2012 23:48:23 +0200 Subject: [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 --- plugins/xsettings/msd-xsettings-manager.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'plugins') 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); -- cgit v1.2.1