aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/Wizard.py
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2005-12-10 23:11:45 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2005-12-10 23:11:45 +0000
commit0ad8a5e3943746735fa6de06e089ac58c40800b6 (patch)
tree6aa501db7d7e84935cb1147e507dd0e4a10816a1 /lib/python/Screens/Wizard.py
parent0bbd93ba1e8f12d5cf1756e6a80e7513af51fe79 (diff)
downloadenigma2-0ad8a5e3943746735fa6de06e089ac58c40800b6.tar.gz
enigma2-0ad8a5e3943746735fa6de06e089ac58c40800b6.zip
add language selection to the start-wizard
Diffstat (limited to 'lib/python/Screens/Wizard.py')
-rw-r--r--lib/python/Screens/Wizard.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/python/Screens/Wizard.py b/lib/python/Screens/Wizard.py
index 7687f44d..38235b12 100644
--- a/lib/python/Screens/Wizard.py
+++ b/lib/python/Screens/Wizard.py
@@ -39,7 +39,7 @@ class WelcomeWizard(Screen, HelpableScreen):
self.currContent = name
if (name == "step"):
self.lastStep = int(attrs.get('number'))
- self.wizard[self.lastStep] = {"text": "", "list": [], "config": {"screen": None, "args": None }, "code": ""}
+ self.wizard[self.lastStep] = {"text": "", "list": [], "config": {"screen": None, "args": None, "type": "" }, "code": ""}
elif (name == "text"):
self.wizard[self.lastStep]["text"] = str(attrs.get('value'))
elif (name == "listentry"):
@@ -50,6 +50,7 @@ class WelcomeWizard(Screen, HelpableScreen):
if (attrs.has_key('args')):
print "has args"
self.wizard[self.lastStep]["config"]["args"] = str(attrs.get('args'))
+ self.wizard[self.lastStep]["config"]["type"] = str(attrs.get('type'))
def endElement(self, name):
self.currContent = ""
if name == 'code':
@@ -153,14 +154,14 @@ class WelcomeWizard(Screen, HelpableScreen):
def up(self):
if (self.wizard[self.currStep]["config"]["screen"] != None):
- self["config"].instance.moveSelection(self["config"].instance.moveUp)
+ self[self.currConfig].instance.moveSelection(self[self.currConfig].instance.moveUp)
elif (len(self.wizard[self.currStep]["list"]) > 0):
self["list"].instance.moveSelection(self["config"].instance.moveUp)
print "up"
def down(self):
if (self.wizard[self.currStep]["config"]["screen"] != None):
- self["config"].instance.moveSelection(self["config"].instance.moveDown)
+ self[self.currConfig].instance.moveSelection(self[self.currConfig].instance.moveDown)
elif (len(self.wizard[self.currStep]["list"]) > 0):
self["list"].instance.moveSelection(self["config"].instance.moveDown)
print "down"
@@ -181,14 +182,19 @@ class WelcomeWizard(Screen, HelpableScreen):
self["config"].instance.setZPosition(1)
if (self.wizard[self.currStep]["config"]["screen"] != None):
- self["config"].instance.setZPosition(2)
+ if self.wizard[self.currStep]["config"]["type"] == "ConfigList":
+ self.currConfig = "config"
+ elif self.wizard[self.currStep]["config"]["type"] == "MenuList":
+ self.currConfig = "list"
+
+ self[self.currConfig].instance.setZPosition(2)
print self.wizard[self.currStep]["config"]["screen"]
if self.wizard[self.currStep]["config"]["args"] == None:
self.configInstance = self.session.instantiateDialog(self.wizard[self.currStep]["config"]["screen"])
else:
self.configInstance = self.session.instantiateDialog(self.wizard[self.currStep]["config"]["screen"], eval(self.wizard[self.currStep]["config"]["args"]))
- self["config"].l.setList(self.configInstance["config"].list)
- self.configInstance["config"] = self["config"]
+ self[self.currConfig].l.setList(self.configInstance[self.currConfig].list)
+ self.configInstance[self.currConfig] = self[self.currConfig]
else:
self["config"].l.setList([])