3
0
Fork 0
forked from mirrors/nixpkgs

plasma53: fix kcm_keyboard

This commit is contained in:
Thomas Tuegel 2015-05-05 07:21:45 -05:00
parent 0c5be7164c
commit 6dfbbc8e24
2 changed files with 51 additions and 0 deletions

View file

@ -131,6 +131,10 @@ let
patches = [
./plasma-desktop/plasma-desktop-hwclock.patch
./plasma-desktop/plasma-desktop-zoneinfo.patch
(substituteAll {
src = ./plasma-desktop/plasma-desktop-xkb-rules.patch;
xkb = pkgs.xkeyboard_config;
})
];
preConfigure = ''
substituteInPlace kcms/dateandtime/helper.cpp \

View file

@ -0,0 +1,47 @@
From 3f175a5ecc9b4fecd8fe25cb482cf2c91aa47cf6 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Mon, 4 May 2015 22:23:21 -0500
Subject: [PATCH] xkb rules path
---
kcms/keyboard/xkb_rules.cpp | 24 +-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/kcms/keyboard/xkb_rules.cpp b/kcms/keyboard/xkb_rules.cpp
index 341369d..27066d6 100644
--- a/kcms/keyboard/xkb_rules.cpp
+++ b/kcms/keyboard/xkb_rules.cpp
@@ -157,29 +157,7 @@ QString Rules::getRulesName()
QString Rules::findXkbDir()
{
- QString xkbParentDir;
-
- QString base(XLIBDIR);
- if( base.count('/') >= 3 ) {
- // .../usr/lib/X11 -> /usr/share/X11/xkb vs .../usr/X11/lib -> /usr/X11/share/X11/xkb
- QString delta = base.endsWith("X11") ? "/../../share/X11" : "/../share/X11";
- QDir baseDir(base + delta);
- if( baseDir.exists() ) {
- xkbParentDir = baseDir.absolutePath();
- }
- else {
- QDir baseDir(base + "/X11"); // .../usr/X11/lib/X11/xkb (old XFree)
- if( baseDir.exists() ) {
- xkbParentDir = baseDir.absolutePath();
- }
- }
- }
-
- if( xkbParentDir.isEmpty() ) {
- xkbParentDir = "/usr/share/X11";
- }
-
- return xkbParentDir + "/xkb";
+ return "@xkb@/share/X11/xkb";
}
static QString findXkbRulesFile()
--
2.3.6