summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-11-28 00:51:39 +0100
committerZenWalker <[email protected]>2018-11-29 23:52:18 +0100
commit1514a0f56f4ad81d178f014bd594a7b1f1b99a2c (patch)
tree938ef514710843b1a550cd6f2c241d08cd230af5 /src
parent79fe889019638cd7f4cf5f64c3ef6dd691a992a3 (diff)
downloadmate-power-manager-1514a0f56f4ad81d178f014bd594a7b1f1b99a2c.tar.bz2
mate-power-manager-1514a0f56f4ad81d178f014bd594a7b1f1b99a2c.tar.xz
gpm-control: avoid deprecated 'g_settings_list_schemas'
Diffstat (limited to 'src')
-rw-r--r--src/gpm-control.c6
1 files 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. :-) */