summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <[email protected]>2014-05-26 17:32:28 +0200
committerraveit65 <[email protected]>2018-08-28 10:01:33 +0200
commit763db9d81c7f5f3d0871a034e38cbf5b25124a09 (patch)
treee36f1aef9492f65565d5f234cb34c0c749bc9f58
parent0d4ec030918e9fd7f93cb7898088d05eafa51fc1 (diff)
downloadmate-settings-daemon-763db9d81c7f5f3d0871a034e38cbf5b25124a09.tar.bz2
mate-settings-daemon-763db9d81c7f5f3d0871a034e38cbf5b25124a09.tar.xz
daemon: Stop using deprecated GSettings API
origin commit: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/commit/36f32a3
-rw-r--r--mate-settings-daemon/mate-settings-manager.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/mate-settings-daemon/mate-settings-manager.c b/mate-settings-daemon/mate-settings-manager.c
index 4936c84..9b43478 100644
--- a/mate-settings-daemon/mate-settings-manager.c
+++ b/mate-settings-daemon/mate-settings-manager.c
@@ -158,8 +158,8 @@ on_plugin_deactivated (MateSettingsPluginInfo *info,
}
static gboolean
-is_item_in_schema (const char * const *items,
- const char *item)
+is_item_in_schema (char **items,
+ const char *item)
{
while (*items) {
if (g_strcmp0 (*items++, item) == 0)
@@ -171,7 +171,18 @@ is_item_in_schema (const char * const *items,
static gboolean
is_schema (const char *schema)
{
- return is_item_in_schema (g_settings_list_schemas (), schema);
+ GSettingsSchemaSource *source = NULL;
+ gchar **non_relocatable = NULL;
+ gchar **relocatable = NULL;
+
+ source = g_settings_schema_source_get_default ();
+ if (!source)
+ return FALSE;
+
+ g_settings_schema_source_list_schemas (source, TRUE, &non_relocatable, &relocatable);
+
+ return (is_item_in_schema (non_relocatable, schema) ||
+ is_item_in_schema (relocatable, schema));
}
static void