summaryrefslogtreecommitdiffstats
path: root/text.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2001-02-06 23:35:03 +0000
committerErik Troan <ewt@redhat.com>2001-02-06 23:35:03 +0000
commitddaa389f9737900931802249e62e96058a6f7194 (patch)
tree0a35aa2c95a5800e0f9ed640e8a3911fc74c4ad7 /text.py
parent9b65926e35869f488e2e9fe11725bcd01c1c9e05 (diff)
downloadanaconda-ddaa389f9737900931802249e62e96058a6f7194.tar.gz
anaconda-ddaa389f9737900931802249e62e96058a6f7194.tar.xz
anaconda-ddaa389f9737900931802249e62e96058a6f7194.zip
fixed default selection
Diffstat (limited to 'text.py')
-rw-r--r--text.py28
1 files changed, 7 insertions, 21 deletions
diff --git a/text.py b/text.py
index f9869698e..667e7327f 100644
--- a/text.py
+++ b/text.py
@@ -116,32 +116,18 @@ class LanguageWindow:
class LanguageSupportWindow:
def __call__(self, screen, todo):
# should already be sorted
- languages = todo.language.getAllSupported()
- langs = todo.language.getSupported ()
-
- # We don't use todo.instTimeLanguage.getCurrent() because it returns a
- # long name rather then a short locale name, and long names may not
- # match between todo.instTimeLanguage and todo.language
- if not langs and os.environ.has_key('LANG'):
- current = todo.language.getLangNameByNick(os.environ['LANG'])
- else:
- current = None
-
-
ct = CheckboxTree(height = 8, scroll = 1)
- for lang in languages:
- if lang == current:
- ct.append(lang, lang, 1)
- ct.setCurrent(lang)
- else:
- ct.append(lang, lang, 0)
+ for lang in todo.language.getAllSupported():
+ ct.append(lang, lang, 0)
+ for lang in todo.language.getSupported ():
+ ct.setEntryValue(lang, 1)
- if langs != None:
- for lang in langs:
- ct.setEntryValue(lang, 1)
+ current = todo.language.getDefault()
+ ct.setCurrent(current)
+ ct.setEntryValue(current, 1)
bb = ButtonBar (screen, ((_("OK"), "ok"), (_("Select All"), "all"), (_("Reset"), "reset"), (_("Back"), "back")))