* Prefer exact keymap locale matches to substring matches.

master
Colin Watson 18 years ago
parent c1e56a7c2e
commit 9e419db77a

1
debian/changelog vendored

@ -3,6 +3,7 @@ gfxboot-theme-ubuntu (0.3.0) UNRELEASED; urgency=low
* Add Swiss French keymap (closes: Malone #67355).
* Pass any country code found in ll_CC form in the "lang" file through to
Linux. Make sure to strip off the country internally when required.
* Prefer exact keymap locale matches to substring matches.
-- Colin Watson <cjwatson@ubuntu.com> Sun, 29 Oct 2006 21:11:47 +0000

@ -43,9 +43,11 @@
/config.keymap.locale exch def
/setkeymap.found false def
% Look for an exact match first.
keymaps {
dup .km.locales get {
config.keymap.locale exch strstr 0 ne {
config.keymap.locale exch eq {
dup /config.keymap exch def /setkeymap.found true def exit
} if
} forall
@ -53,6 +55,19 @@
setkeymap.found { exit } if
} forall
% If that didn't work, try a substring match.
setkeymap.found not {
keymaps {
dup .km.locales get {
config.keymap.locale exch strstr 0 ne {
dup /config.keymap exch def /setkeymap.found true def exit
} if
} forall
pop
setkeymap.found { exit } if
} forall
} if
% if we couldn't find anything, try without the country
setkeymap.found not {
config.keymap.locale "_" strstr dup 0 ne {

Loading…
Cancel
Save