diff options
Diffstat (limited to 'mate-screenshot/mate-screenshot.c')
-rw-r--r-- | mate-screenshot/mate-screenshot.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/mate-screenshot/mate-screenshot.c b/mate-screenshot/mate-screenshot.c index 0e122b47..03b23e54 100644 --- a/mate-screenshot/mate-screenshot.c +++ b/mate-screenshot/mate-screenshot.c @@ -1122,26 +1122,21 @@ get_desktop_dir (void) { gboolean desktop_is_home_dir = FALSE; gchar *desktop_dir; - const char * const *schemas; gboolean schema_exists = FALSE; - gint i; /* Check if caja schema is installed before trying to read settings */ - schemas = g_settings_list_schemas (); - for (i = 0; schemas[i] != NULL; i++) { - if (g_strcmp0 (schemas[i], CAJA_PREFERENCES_SCHEMA) == 0) { - schema_exists = TRUE; - break; - } - } + GSettingsSchema *schema = g_settings_schema_source_lookup (g_settings_schema_source_get_default (), + CAJA_PREFERENCES_SCHEMA, + FALSE); - if (schema_exists) { + if (schema != NULL) { GSettings *caja_prefs; caja_prefs = g_settings_new (CAJA_PREFERENCES_SCHEMA); desktop_is_home_dir = g_settings_get_boolean (caja_prefs, "desktop-is-home-dir"); g_object_unref (caja_prefs); + g_settings_schema_unref (schema); } if (desktop_is_home_dir) |