fix Makefiles
[enigma2.git] / lib / python / Screens / WizardLanguage.py
1 from Wizard import Wizard
2 from Components.Label import Label
3 from Components.Language import language
4
5 class WizardLanguage(Wizard):
6         def __init__(self, session, showSteps = True, showStepSlider = True, showList = True, showConfig = True):
7                 Wizard.__init__(self, session, showSteps, showStepSlider, showList, showConfig)
8                 
9                 self["languagetext"] = Label()
10                 self.updateLanguageDescription()
11                 
12         def red(self):
13                 self.resetCounter()
14                 self.languageSelect()
15                 
16         def languageSelect(self):
17                 print "languageSelect"
18                 newlanguage = language.getActiveLanguageIndex() + 1
19                 if newlanguage >= len(language.getLanguageList()):
20                         newlanguage = 0
21                 language.activateLanguageIndex(newlanguage)
22                 
23                 self.updateTexts()
24
25         def updateLanguageDescription(self):
26                 print language.getLanguageList()[language.getActiveLanguageIndex()]
27                 self["languagetext"].setText(_(language.getLanguageList()[language.getActiveLanguageIndex()][1][0]))
28                 
29         def updateTexts(self):
30                 print "updateTexts"
31                 self.updateText(firstset = True)
32                 self.updateValues()
33                 self.updateLanguageDescription()
34                 
35
36                 
37