summaryrefslogtreecommitdiffstats
path: root/text.py
diff options
context:
space:
mode:
authorbfox <bfox>2001-01-18 21:59:50 +0000
committerbfox <bfox>2001-01-18 21:59:50 +0000
commitd9ed29bd788151cec16e7bd831a3965e572d4ead (patch)
tree1c915e9803590e5d4144a0c5299eb7feb5fb44f3 /text.py
parent3a41a90c80bd675d067b15518888760c2e43b317 (diff)
downloadanaconda-d9ed29bd788151cec16e7bd831a3965e572d4ead.tar.gz
anaconda-d9ed29bd788151cec16e7bd831a3965e572d4ead.tar.xz
anaconda-d9ed29bd788151cec16e7bd831a3965e572d4ead.zip
Made it so that the language selection screen shrinks if you only have a few options. Also, if you only install one language, you don't have to see that screen at all.
Diffstat (limited to 'text.py')
-rw-r--r--text.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/text.py b/text.py
index 93720f2e1..b1eaf56a3 100644
--- a/text.py
+++ b/text.py
@@ -182,6 +182,9 @@ class LanguageDefaultWindow:
languages = todo.language.available ()
langs = todo.language.getSupported ()
+ if len(langs) <= 1:
+ return
+
descriptions = languages.keys ()
descriptions.sort ()
current = todo.language.get ()
@@ -195,7 +198,7 @@ class LanguageDefaultWindow:
if found == 0:
default = langs[0]
- height = min((screen.height - 16, len(descriptions)))
+ height = min((screen.height - 16, len(langs)))
buttons = [_("Ok"), _("Back")]
@@ -208,12 +211,6 @@ class LanguageDefaultWindow:
choice = langs[choice]
-# lang = languages [choice]
-
-# print choice
-# time.sleep(2)
-# todo.language.setByAbbrev (choice)
-
todo.language.set (choice)
return INSTALL_OK