summaryrefslogtreecommitdiff
path: root/libmate-panel-applet/mate-panel-applet-gsettings.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmate-panel-applet/mate-panel-applet-gsettings.c')
-rw-r--r--libmate-panel-applet/mate-panel-applet-gsettings.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/libmate-panel-applet/mate-panel-applet-gsettings.c b/libmate-panel-applet/mate-panel-applet-gsettings.c
index 82867639..93d0b4ce 100644
--- a/libmate-panel-applet/mate-panel-applet-gsettings.c
+++ b/libmate-panel-applet/mate-panel-applet-gsettings.c
@@ -90,8 +90,21 @@ add_to_dict (GVariant *dict, const gchar *schema, const gchar *path)
static void
register_dconf_editor_relocatable_schema (const gchar *schema, const gchar *path)
{
- GSettings *dconf_editor_settings;
- dconf_editor_settings = g_settings_new ("ca.desrt.dconf-editor.Settings");
+ GSettingsSchemaSource *source;
+ GSettingsSchema *dconf_editor_schema;
+ GSettings *dconf_editor_settings;
+
+ source = g_settings_schema_source_get_default ();
+
+ if (! source)
+ return;
+
+ dconf_editor_schema = g_settings_schema_source_lookup (source, "ca.desrt.dconf-editor.Settings", FALSE);
+
+ if (! dconf_editor_schema)
+ return;
+
+ dconf_editor_settings = g_settings_new_full (dconf_editor_schema, NULL, NULL);
if (dconf_editor_settings && g_settings_is_writable (dconf_editor_settings, "relocatable-schemas-user-paths")) {
GVariant *relocatable_schemas = g_settings_get_value (dconf_editor_settings, "relocatable-schemas-user-paths");
@@ -108,6 +121,7 @@ register_dconf_editor_relocatable_schema (const gchar *schema, const gchar *path
}
g_object_unref (dconf_editor_settings);
+ g_settings_schema_unref (dconf_editor_schema);
}
GSettings *