Skip to content

Commit c0be5a7

Browse files
sc0wlukefromdc
authored andcommitted
prefs: avoid deprecated 'g_settings_list_keys'
1 parent 683d5cf commit c0be5a7

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/core/prefs.c

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,10 +1683,14 @@ static MetaKeyPref key_bindings[] = {
16831683
static void
16841684
init_bindings (GSettings *settings)
16851685
{
1686+
GSettingsSchema *schema;
16861687
gchar **list = NULL;
16871688
gchar *str_val = NULL;
16881689

1689-
list = g_settings_list_keys (settings);
1690+
g_object_get (settings, "settings-schema", &schema, NULL);
1691+
list = g_settings_schema_list_keys (schema);
1692+
g_settings_schema_unref (schema);
1693+
16901694
while (*list != NULL)
16911695
{
16921696
str_val = g_settings_get_string (settings, *list);
@@ -1712,10 +1716,14 @@ init_window_bindings (void)
17121716
static void
17131717
init_commands (void)
17141718
{
1719+
GSettingsSchema *schema;
17151720
gchar **list = NULL;
17161721
gchar *str_val = NULL;
17171722

1718-
list = g_settings_list_keys (settings_command);
1723+
g_object_get (settings_command, "settings-schema", &schema, NULL);
1724+
list = g_settings_schema_list_keys (schema);
1725+
g_settings_schema_unref (schema);
1726+
17191727
while (*list != NULL)
17201728
{
17211729
str_val = g_settings_get_string (settings_command, *list);
@@ -1729,10 +1737,14 @@ init_commands (void)
17291737
static void
17301738
init_workspace_names (void)
17311739
{
1740+
GSettingsSchema *schema;
17321741
gchar **list = NULL;
17331742
gchar *str_val = NULL;
17341743

1735-
list = g_settings_list_keys (settings_workspace_names);
1744+
g_object_get (settings_workspace_names, "settings-schema", &schema, NULL);
1745+
list = g_settings_schema_list_keys (schema);
1746+
g_settings_schema_unref (schema);
1747+
17361748
while (*list != NULL)
17371749
{
17381750
str_val = g_settings_get_string (settings_workspace_names, *list);

0 commit comments

Comments
 (0)