From c0be5a780b57e4e6133af6dc0c5637090517cd58 Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Wed, 9 Jan 2019 00:35:35 +0100 Subject: prefs: avoid deprecated 'g_settings_list_keys' --- src/core/prefs.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/core/prefs.c b/src/core/prefs.c index 74cf0ca7..81ce07b9 100644 --- a/src/core/prefs.c +++ b/src/core/prefs.c @@ -1683,10 +1683,14 @@ static MetaKeyPref key_bindings[] = { static void init_bindings (GSettings *settings) { + GSettingsSchema *schema; gchar **list = NULL; gchar *str_val = NULL; - list = g_settings_list_keys (settings); + g_object_get (settings, "settings-schema", &schema, NULL); + list = g_settings_schema_list_keys (schema); + g_settings_schema_unref (schema); + while (*list != NULL) { str_val = g_settings_get_string (settings, *list); @@ -1712,10 +1716,14 @@ init_window_bindings (void) static void init_commands (void) { + GSettingsSchema *schema; gchar **list = NULL; gchar *str_val = NULL; - list = g_settings_list_keys (settings_command); + g_object_get (settings_command, "settings-schema", &schema, NULL); + list = g_settings_schema_list_keys (schema); + g_settings_schema_unref (schema); + while (*list != NULL) { str_val = g_settings_get_string (settings_command, *list); @@ -1729,10 +1737,14 @@ init_commands (void) static void init_workspace_names (void) { + GSettingsSchema *schema; gchar **list = NULL; gchar *str_val = NULL; - list = g_settings_list_keys (settings_workspace_names); + g_object_get (settings_workspace_names, "settings-schema", &schema, NULL); + list = g_settings_schema_list_keys (schema); + g_settings_schema_unref (schema); + while (*list != NULL) { str_val = g_settings_get_string (settings_workspace_names, *list); -- cgit v1.2.1