diff options
| author | acid-burn <acidburn@opendreambox.org> | 2009-05-06 14:40:48 +0200 |
|---|---|---|
| committer | acid-burn <acidburn@opendreambox.org> | 2009-05-06 14:40:48 +0200 |
| commit | 8d3e9193ba0ddaa819db9c6a0447eca74a8328a3 (patch) | |
| tree | c60c59ca421551aa811a92cae7dcd948fe159003 /lib/python/Components/SetupDevices.py | |
| parent | ab4b0f90b14df623075a8b3fc1b321a370800cc6 (diff) | |
| download | enigma2-8d3e9193ba0ddaa819db9c6a0447eca74a8328a3.tar.gz enigma2-8d3e9193ba0ddaa819db9c6a0447eca74a8328a3.zip | |
add option to select a keymap for a attached keyboard.
this closes #11
Diffstat (limited to 'lib/python/Components/SetupDevices.py')
| -rwxr-xr-x[-rw-r--r--] | lib/python/Components/SetupDevices.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/python/Components/SetupDevices.py b/lib/python/Components/SetupDevices.py index 71fb1e47..b037ea77 100644..100755 --- a/lib/python/Components/SetupDevices.py +++ b/lib/python/Components/SetupDevices.py @@ -1,6 +1,7 @@ from config import config, ConfigSelection, ConfigSubsection, ConfigOnOff, ConfigText from Components.Timezones import timezones from Components.Language import language +from Components.Keyboard import keyboard def InitSetupDevices(): @@ -11,8 +12,12 @@ def InitSetupDevices(): config.timezone.val = ConfigSelection(default = timezones.getDefaultTimezone(), choices = timezones.getTimezoneList()) config.timezone.val.addNotifier(timezoneNotifier) + def keyboardNotifier(configElement): + keyboard.activateKeyboardMap(configElement.index) + config.keyboard = ConfigSubsection(); - config.keyboard.keymap = ConfigSelection(choices = [("en", _("English")), ("de",_("German"))]) + config.keyboard.keymap = ConfigSelection(default = keyboard.getDefaultKeyboardMap(), choices = keyboard.getKeyboardMaplist()) + config.keyboard.keymap.addNotifier(keyboardNotifier) def languageNotifier(configElement): language.activateLanguage(configElement.value) |
