diff options
author | Louis Bettens <louis@bettens.info> | 2019-12-13 23:43:27 +0100 |
---|---|---|
committer | Louis Bettens <louis@bettens.info> | 2019-12-14 11:19:59 +0100 |
commit | 450446b5353e8231edded4d5b5db90a67a9fa9b7 (patch) | |
tree | e26709c3ba4d9951758f432c027e80d822df82ea | |
parent | 325bc7dcb78ff23d0f5760452c6198e4d8d2a40d (diff) | |
download | gnome-desktop-450446b5353e8231edded4d5b5db90a67a9fa9b7.tar.gz |
xkb: Honor XKB_CONFIG_ROOT environment variable
Fixes: #130
-rw-r--r-- | libgnome-desktop/gnome-xkb-info.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); |