[devhelp/wip/gsettings-in-lib] test dconf migration in flatpak



commit 17cebbff63cbd77f9838550f1ae121c48132b9cd
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Mar 9 10:57:52 2018 +0100

    test dconf migration in flatpak
    
    It works fine!

 devhelp/dh-settings.c          |   10 ++++++++++
 flatpak/org.gnome.Devhelp.json |    2 +-
 2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/devhelp/dh-settings.c b/devhelp/dh-settings.c
index 4bc4845..16a51fc 100644
--- a/devhelp/dh-settings.c
+++ b/devhelp/dh-settings.c
@@ -19,6 +19,7 @@
 
 #include "config.h"
 #include "dh-settings.h"
+#include "dh-dconf-migration.h"
 
 /* Devhelp GSettings schema IDs */
 #define SETTINGS_SCHEMA_ID_WINDOW               "org.gnome.devhelp.state.main.window"
@@ -117,6 +118,8 @@ fonts_changed_cb (GSettings *gsettings,
 static void
 dh_settings_init (DhSettings *self)
 {
+        DhDconfMigration *migration;
+
         self->priv = dh_settings_get_instance_private (self);
 
         self->priv->settings_window = g_settings_new (SETTINGS_SCHEMA_ID_WINDOW);
@@ -143,6 +146,13 @@ dh_settings_init (DhSettings *self)
                                  G_CALLBACK (fonts_changed_cb),
                                  self,
                                  0);
+
+        migration = _dh_dconf_migration_new ();
+        _dh_dconf_migration_migrate_key (migration,
+                                         "/org/gnome/devhelp/state/main/window/height2",
+                                         "/org/gnome/devhelp/state/main/window/height",
+                                         NULL);
+        _dh_dconf_migration_free (migration);
 }
 
 DhSettings *
diff --git a/flatpak/org.gnome.Devhelp.json b/flatpak/org.gnome.Devhelp.json
index abd6771..ade3fdc 100644
--- a/flatpak/org.gnome.Devhelp.json
+++ b/flatpak/org.gnome.Devhelp.json
@@ -41,7 +41,7 @@
                 {
                     "type": "git",
                     "url": "git://git.gnome.org/devhelp",
-                    "branch": "master"
+                    "branch": "wip/gsettings-in-lib"
                 }
             ]
         }


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