summaryrefslogtreecommitdiff
path: root/src/procman.cpp
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-01-10 01:12:06 +0100
committerPablo Barciela <[email protected]>2019-01-10 01:12:06 +0100
commit12959ae75ac93c11e2b3eefdf8f3fb46a76a3822 (patch)
tree30657456bdb4317bebcb0638d2433ee293e756b4 /src/procman.cpp
parent44386376850b0635c4da6eb047bb0f92a51db40d (diff)
downloadmate-system-monitor-12959ae75ac93c11e2b3eefdf8f3fb46a76a3822.tar.bz2
mate-system-monitor-12959ae75ac93c11e2b3eefdf8f3fb46a76a3822.tar.xz
procman: avoid deprecated 'g_settings_list_keys'
Diffstat (limited to 'src/procman.cpp')
-rw-r--r--src/procman.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/procman.cpp b/src/procman.cpp
index 29b9087..b6e94cb 100644
--- a/src/procman.cpp
+++ b/src/procman.cpp
@@ -241,6 +241,7 @@ show_all_fs_changed_cb (GSettings *settings, const gchar *key, gpointer data)
static ProcData *
procman_data_new (GSettings *settings)
{
+ GSettingsSchema *schema;
ProcData *pd;
gchar *color;
gchar **keys;
@@ -292,7 +293,10 @@ procman_data_new (GSettings *settings)
pd->config.num_cpus = glibtop_get_sysinfo()->ncpu; // or server->ncpu + 1
- keys = g_settings_list_keys (settings);
+ g_object_get (settings, "settings-schema", &schema, NULL);
+ keys = g_settings_schema_list_keys (schema);
+ g_settings_schema_unref (schema);
+
for (int i = 0; i < pd->config.num_cpus; i++) {
gchar *key;
key = g_strdup_printf ("cpu-color%d", i);