[SCM] GUI front-end for Debian Live. branch, master, updated. 06a3941a49beb1dc02489f7c00fa05d096b85b7d
Chris Lamb
chris at chris-lamb.co.uk
Sun Aug 10 06:36:43 UTC 2008
The following commit has been merged in the master branch:
commit 06a3941a49beb1dc02489f7c00fa05d096b85b7d
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date: Sun Aug 10 07:36:15 2008 +0100
Smarter keyboard detection.
Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>
diff --git a/LiveMagic/views/wizard.py b/LiveMagic/views/wizard.py
index 6365d1e..cbe233b 100644
--- a/LiveMagic/views/wizard.py
+++ b/LiveMagic/views/wizard.py
@@ -107,13 +107,28 @@ class WizardView(object):
c.set_active(idx)
c = self['combo_keyboard']
+ match = None
+
try:
kv = KeyVar('/etc/default', 'console-setup', {}, filename='/etc/default/console-setup')
match = kv.get('XKBLAYOUT')
- if match == 'gb':
- match = 'uk'
except IOError:
+ pass
+
+ pat = re.compile(r'\s*Option\s*"XkbLayout"\s*"([^"]+)"')
+ try:
+ xorgconf = file('/etc/X11/xorg.conf')
+ for line in xorgconf:
+ m = pat.match(line)
+ if m:
+ match = m.group(1)
+ except IOError:
+ pass
+
+ if match is None:
match = "us"
+ elif match == 'gb':
+ match = 'uk'
for idx, layout in enumerate(self.controller.get_keyboard_layouts()):
code, name = layout
--
GUI front-end for Debian Live.
More information about the debian-live-changes
mailing list