diff options
author | Erik Troan <ewt@redhat.com> | 2000-07-15 14:49:20 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-07-15 14:49:20 +0000 |
commit | 7f87b3b8438a598096c7c492c7489bcbad0a9054 (patch) | |
tree | 288583329d235b3d4ea88b286ed29a16b31147fc /text.py | |
parent | 29bb99bf1ea54778c7c30ee6f129e98e1e0c7740 (diff) | |
download | anaconda-7f87b3b8438a598096c7c492c7489bcbad0a9054.tar.gz anaconda-7f87b3b8438a598096c7c492c7489bcbad0a9054.tar.xz anaconda-7f87b3b8438a598096c7c492c7489bcbad0a9054.zip |
set the default keyboard based on the language
Diffstat (limited to 'text.py')
-rw-r--r-- | text.py | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -96,12 +96,20 @@ class LanguageWindow: return INSTALL_OK class KeyboardWindow: + beenRun = 0 + def __call__(self, screen, todo): if todo.serial: return INSTALL_NOOP keyboards = todo.keyboard.available () keyboards.sort () - default = keyboards.index (todo.keyboard.get ()) + + if self.beenRun: + default = todo.keyboard.get () + else: + default = iutil.defaultKeyboard() + + default = keyboards.index (default) (button, choice) = \ ListboxChoiceWindow(screen, _("Keyboard Selection"), @@ -111,7 +119,10 @@ class KeyboardWindow: if button == string.lower (_("Back")): return INSTALL_BACK + todo.keyboard.set (keyboards[choice]) + self.beenRun = 1 + if not todo.serial: if todo.reconfigOnly: iutil.execWithRedirect ("/bin/loadkeys", |