File: dconf-override.patch

package info (click to toggle)
gromit-mpx 1.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,684 kB
  • sloc: ansic: 3,879; xml: 126; sh: 40; makefile: 6
file content (23 lines) | stat: -rw-r--r-- 882 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/engine/dconf-engine-source-user.c b/engine/dconf-engine-source-user.c
index 1657875..e4f8786 100644
--- a/engine/dconf-engine-source-user.c
+++ b/engine/dconf-engine-source-user.c
@@ -39,11 +39,17 @@ dconf_engine_source_user_open_gvdb (const gchar *name)
 {
   GvdbTable *table;
   gchar *filename;
+  const gchar *override;
+
+  override = g_getenv ("DCONF_USER_CONFIG_DIR");
+  if (override == NULL)
+    filename = g_build_filename (g_get_user_config_dir (), "dconf", name, NULL);
+  else
+    filename = g_build_filename (g_get_home_dir (), override, name, NULL);
 
   /* This can fail in the normal case of the user not having any
    * settings.  That's OK and it shouldn't be considered as an error.
    */
-  filename = g_build_filename (g_get_user_config_dir (), "dconf", name, NULL);
   table = gvdb_table_new (filename, FALSE, NULL);
   g_free (filename);