Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
gsm-manager: avoid deprecated 'g_settings_list_schemas'
  • Loading branch information
sc0w authored and lukefromdc committed Nov 27, 2018
1 parent 6b7875b commit 7b99ea5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mate-session/gsm-manager.c
Expand Up @@ -2717,7 +2717,7 @@ on_presence_status_changed (GsmPresence *presence,
static void
gsm_manager_init (GsmManager *manager)
{
const char * const *schemas;
gchar **schemas = NULL;
gboolean schema_exists;
guint i;
GsmManagerPrivate *priv;
Expand All @@ -2728,14 +2728,17 @@ gsm_manager_init (GsmManager *manager)
priv->settings_lockdown = g_settings_new (LOCKDOWN_SCHEMA);

/* check if mate-screensaver is installed */
schemas = g_settings_list_schemas ();
g_settings_schema_source_list_schemas (g_settings_schema_source_get_default (), TRUE, &schemas, NULL);
schema_exists = FALSE;
for (i = 0; schemas[i] != NULL; i++) {
if (g_str_equal (schemas[i], SCREENSAVER_SCHEMA)) {
schema_exists = TRUE;
break;
}
}

g_strfreev (schemas);

if (schema_exists == TRUE)
priv->settings_screensaver = g_settings_new (SCREENSAVER_SCHEMA);
else
Expand Down

0 comments on commit 7b99ea5

Please sign in to comment.