Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mate-bg: avoid deprecated 'g_settings_list_keys'
  • Loading branch information
sc0w committed Jan 9, 2019
1 parent 0c8a787 commit e263ed7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions libmate-desktop/mate-bg.c
Expand Up @@ -304,6 +304,7 @@ mate_bg_load_from_system_gsettings (MateBG *bg,
GSettings *settings,
gboolean reset_apply)
{
GSettingsSchema *schema;
gchar **keys;
gchar **k;

Expand All @@ -312,9 +313,12 @@ mate_bg_load_from_system_gsettings (MateBG *bg,

g_settings_delay (settings);

keys = g_settings_list_keys (settings);
for (k = keys; *k; k++) {
g_settings_reset (settings, *k);
g_object_get (settings, "settings-schema", &schema, NULL);
keys = g_settings_schema_list_keys (schema);
g_settings_schema_unref (schema);

for (k = keys; *k; k++) {
g_settings_reset (settings, *k);
}
g_strfreev (keys);

Expand Down

0 comments on commit e263ed7

Please sign in to comment.