Skip to content

Commit

Permalink
daemon: Stop using deprecated GSettings API
Browse files Browse the repository at this point in the history
  • Loading branch information
rtcm authored and raveit65 committed Aug 28, 2018
1 parent 0d4ec03 commit 763db9d
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions mate-settings-daemon/mate-settings-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 763db9d

Please sign in to comment.