summaryrefslogtreecommitdiff
path: root/mate-screenshot
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-16 00:11:52 +0100
committerinfirit <[email protected]>2014-12-16 00:46:17 +0100
commit0c53acf555da0386c5089cbd0db59dc3e5bb0a6a (patch)
tree47b52cda7ef72b87fdb2959ee48730aee66b2ac1 /mate-screenshot
parente18af0c730ecf306ad81b075167ce596309739a7 (diff)
downloadmate-utils-0c53acf555da0386c5089cbd0db59dc3e5bb0a6a.tar.bz2
mate-utils-0c53acf555da0386c5089cbd0db59dc3e5bb0a6a.tar.xz
mate-screenshot: Do not use g_settings_list_schemas
Diffstat (limited to 'mate-screenshot')
-rw-r--r--mate-screenshot/mate-screenshot.c15
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)