summaryrefslogtreecommitdiff
path: root/gsearchtool/gsearchtool.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-16 00:51:49 +0100
committerinfirit <[email protected]>2014-12-16 00:51:49 +0100
commit1aac000a0f01651a49a00f53ebdf265792c7ea2e (patch)
tree4a95469b1df68bcc8c665bdeb1e76d9f2b2e765e /gsearchtool/gsearchtool.c
parent0c53acf555da0386c5089cbd0db59dc3e5bb0a6a (diff)
downloadmate-utils-1aac000a0f01651a49a00f53ebdf265792c7ea2e.tar.bz2
mate-utils-1aac000a0f01651a49a00f53ebdf265792c7ea2e.tar.xz
gsearchtool: Do not use g_settings_list_schemas
Diffstat (limited to 'gsearchtool/gsearchtool.c')
-rw-r--r--gsearchtool/gsearchtool.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gsearchtool/gsearchtool.c b/gsearchtool/gsearchtool.c
index 2295884c..b2e7aa68 100644
--- a/gsearchtool/gsearchtool.c
+++ b/gsearchtool/gsearchtool.c
@@ -2739,8 +2739,6 @@ gsearch_app_create (GSearchWindow * gsearch)
GtkWidget * label;
GtkWidget * button;
GtkWidget * container;
- const char * const *schemas;
- gint i;
gsearch->mate_search_tool_settings = g_settings_new ("org.mate.search-tool");
gsearch->mate_search_tool_select_settings = g_settings_new ("org.mate.search-tool.select");
@@ -2748,12 +2746,13 @@ gsearch_app_create (GSearchWindow * gsearch)
/* Check if caja schema is installed before trying to read caja settings */
gsearch->caja_schema_exists = FALSE;
- schemas = g_settings_list_schemas ();
- for (i = 0; schemas[i] != NULL; i++) {
- if (g_strcmp0 (schemas[i], CAJA_PREFERENCES_SCHEMA) == 0) {
- gsearch->caja_schema_exists = TRUE;
- break;
- }
+ GSettingsSchema *schema = g_settings_schema_source_lookup (g_settings_schema_source_get_default (),
+ CAJA_PREFERENCES_SCHEMA,
+ FALSE);
+
+ if (schema != NULL) {
+ gsearch->caja_schema_exists = TRUE;
+ g_settings_schema_unref (schema);
}
if (gsearch->caja_schema_exists) {