Skip to content
Permalink
Browse files

gsm-manager: avoid deprecated 'g_settings_list_schemas'

  • Loading branch information...
sc0w authored and lukefromdc committed Nov 26, 2018
1 parent 6b7875b commit 7b99ea52ed806d82d414d1a2a3392fb21b210103
Showing with 5 additions and 2 deletions.
  1. +5 −2 mate-session/gsm-manager.c
@@ -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;
@@ -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

0 comments on commit 7b99ea5

Please sign in to comment.
You can’t perform that action at this time.