[gnome-settings-daemon/wip/benzea/multiple-keybindings: 9/15] common: Don't reset settings after updating the value



commit 7202d68984984efce0b91058bcb96a332f09692a
Author: Benjamin Berg <bberg redhat com>
Date:   Mon May 13 22:52:22 2019 +0200

    common: Don't reset settings after updating the value
    
    It seems like resetting the key on the old schema will reset the new key
    if their paths match. So reset the old schema before setting the new
    value.

 plugins/common/gsd-settings-migrate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/common/gsd-settings-migrate.c b/plugins/common/gsd-settings-migrate.c
index b72b6987..d8e50a9a 100644
--- a/plugins/common/gsd-settings-migrate.c
+++ b/plugins/common/gsd-settings-migrate.c
@@ -47,6 +47,8 @@ gsd_settings_migrate_check (const gchar             *origin_schema,
                 if (!variant)
                         continue;
 
+                g_settings_reset (origin_settings, entries[i].origin_key);
+
                 if (entries[i].dest_key) {
                         if (entries[i].func) {
                                 g_autoptr(GVariant) new_default = NULL;
@@ -61,8 +63,6 @@ gsd_settings_migrate_check (const gchar             *origin_schema,
 
                         g_settings_set_value (dest_settings, entries[i].dest_key, variant);
                 }
-
-                g_settings_reset (origin_settings, entries[i].origin_key);
         }
 
         g_object_unref (origin_settings);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]