[glib/keyfile-portal-fixes: 5/5] settings: Tweak priorities for keyfile backend
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/keyfile-portal-fixes: 5/5] settings: Tweak priorities for keyfile backend
- Date: Mon, 15 Jul 2019 12:01:44 +0000 (UTC)
commit 63cb2399f7344b4daa028fd8e52fc2c016eda1f5
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 12 11:31:37 2019 -0400
settings: Tweak priorities for keyfile backend
We want to use the keyfile backend in sandboxes,
but we want to avoid people losing their existing
settings that are stored in dconf. Flatpak does
a migration from dconf to keyfile, but only if
the app explictly requests it.
From an app perspective, there are two steps to
the dconf->keyfile migration:
1. Request that flatpak do the migration, by adding
the migrate-path key to the metadata
2. Stop adding the 'dconf hole' to the sandbox
To keep us from switching to the keyfile backend
prematurely, look at whether the app has stopped
requesting a 'dconf hole' in the sandbox.
gio/gkeyfilesettingsbackend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c
index 3bc392351..955b3eda6 100644
--- a/gio/gkeyfilesettingsbackend.c
+++ b/gio/gkeyfilesettingsbackend.c
@@ -80,7 +80,7 @@ typedef struct
#ifdef G_OS_WIN32
#define EXTENSION_PRIORITY 10
#else
-#define EXTENSION_PRIORITY (glib_should_use_portal () ? 110 : 10)
+#define EXTENSION_PRIORITY (glib_should_use_portal () && !glib_has_dconf_access_in_sandbox () ? 110 : 10)
#endif
G_DEFINE_TYPE_WITH_CODE (GKeyfileSettingsBackend,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]