Skip to content
Permalink
Browse files

prefs: avoid deprecated 'g_settings_list_keys'

  • Loading branch information...
sc0w authored and lukefromdc committed Jan 8, 2019
1 parent 683d5cf commit c0be5a780b57e4e6133af6dc0c5637090517cd58
Showing with 15 additions and 3 deletions.
  1. +15 −3 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);

0 comments on commit c0be5a7

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