[gnome-desktop] xkb: Honor XKB_CONFIG_ROOT environment variable



commit 450446b5353e8231edded4d5b5db90a67a9fa9b7
Author: Louis Bettens <louis bettens info>
Date:   Fri Dec 13 23:43:27 2019 +0100

    xkb: Honor XKB_CONFIG_ROOT environment variable
    
    Fixes: #130

 libgnome-desktop/gnome-xkb-info.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/libgnome-desktop/gnome-xkb-info.c b/libgnome-desktop/gnome-xkb-info.c
index 3cd2c9b5..f2f51abb 100644
--- a/libgnome-desktop/gnome-xkb-info.c
+++ b/libgnome-desktop/gnome-xkb-info.c
@@ -131,10 +131,15 @@ free_option_group (gpointer data)
 static gchar *
 get_xml_rules_file_path (const gchar *suffix)
 {
+  const gchar *base_path;
   gchar *rules_file;
   gchar *xml_rules_file;
 
-  rules_file = g_build_filename (XKB_BASE, "rules", XKB_RULES_FILE, NULL);
+  base_path = g_getenv ("XKB_CONFIG_ROOT");
+  if (!base_path)
+    base_path = XKB_BASE;
+
+  rules_file = g_build_filename (base_path, "rules", XKB_RULES_FILE, NULL);
   xml_rules_file = g_strdup_printf ("%s%s", rules_file, suffix);
   g_free (rules_file);
 


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