Skip to content
Permalink
Browse files

gpm-control: avoid deprecated 'g_settings_list_schemas'

  • Loading branch information...
sc0w committed Nov 27, 2018
1 parent 79fe889 commit 1514a0f56f4ad81d178f014bd594a7b1f1b99a2c
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/gpm-control.c
@@ -166,13 +166,13 @@ gpm_control_get_lock_policy (GpmControl *control, const gchar *policy)
{
gboolean do_lock;
gboolean use_ss_setting;
const char * const *schemas;
gchar **schemas = NULL;
gboolean schema_exists;
gint i;

/* Check if the mate-screensaver schema exists before trying to read
the lock setting to prevent crashing. See GNOME bug #651225. */
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_strcmp0 (schemas[i], GS_SETTINGS_SCHEMA) == 0) {
@@ -181,6 +181,8 @@ gpm_control_get_lock_policy (GpmControl *control, const gchar *policy)
}
}

g_strfreev (schemas);

/* This allows us to over-ride the custom lock settings set
with a system default set in mate-screensaver.
See bug #331164 for all the juicy details. :-) */

0 comments on commit 1514a0f

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