Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
prefs: avoid deprecated 'g_settings_list_keys'
  • Loading branch information
sc0w authored and lukefromdc committed Jan 14, 2019
1 parent 683d5cf commit c0be5a7
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/core/prefs.c
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit c0be5a7

Please sign in to comment.