From 1514a0f56f4ad81d178f014bd594a7b1f1b99a2c Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Wed, 28 Nov 2018 00:51:39 +0100 Subject: gpm-control: avoid deprecated 'g_settings_list_schemas' --- src/gpm-control.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gpm-control.c b/src/gpm-control.c index 84a1171..05bd85d 100644 --- a/src/gpm-control.c +++ b/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. :-) */ -- cgit v1.2.1