summaryrefslogtreecommitdiffstats
path: root/text.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-07-15 14:49:20 +0000
committerErik Troan <ewt@redhat.com>2000-07-15 14:49:20 +0000
commit7f87b3b8438a598096c7c492c7489bcbad0a9054 (patch)
tree288583329d235b3d4ea88b286ed29a16b31147fc /text.py
parent29bb99bf1ea54778c7c30ee6f129e98e1e0c7740 (diff)
downloadanaconda-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.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/text.py b/text.py
index 64a246369..313509d2d 100644
--- a/text.py
+++ b/text.py
@@ -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",