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



commit 2e28124ed7083391b5a0536530d3359b03179bf6
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]