feid = config.scan.nims.value
# flags |= eComponentScan.scanSearchBAT
- self.session.openWithCallback(self.keyCancel, ServiceScan, tlist, feid, flags)
+ self.session.openWithCallback(self.doNothing, ServiceScan, tlist, feid, flags)
#self.close()
+ def doNothing(self):
+ pass
def keyCancel(self):
for x in self["config"].list:
class ScanSimple(Screen):
- def keyOK(self):
+ def run(self):
print "start scan for sats:"
tlist = [ ]
for x in self.list:
getInitialTransponderList(tlist, x[1].parent.configPath)
feid = 0 # FIXME
- self.session.openWithCallback(self.keyCancel, ServiceScan, tlist, feid, eComponentScan.scanNetworkSearch)
+ self.session.openWithCallback(self.doNothing, ServiceScan, tlist, feid, eComponentScan.scanNetworkSearch)
+
+ def keyGo(self):
+ print "start scan for sats:"
+ tlist = [ ]
+ for x in self.list:
+ if x[1].parent.value == 0:
+ print " " + str(x[1].parent.configPath)
+ getInitialTransponderList(tlist, x[1].parent.configPath)
+
+ feid = 0 # FIXME
+ self.session.openWithCallback(self.doNothing, ServiceScan, tlist, feid, eComponentScan.scanNetworkSearch)
+
+ def doNothing(self):
+ pass
+
def keyCancel(self):
self.close()
self["actions"] = ActionMap(["SetupActions"],
{
- "ok": self.keyOK,
+ "ok": self.keyGo,
"cancel": self.keyCancel,
"left": self.keyLeft,
"right": self.keyRight,
elif (name == "text"):
self.wizard[self.lastStep]["text"] = str(attrs.get('value'))
elif (name == "listentry"):
- self.wizard[self.lastStep]["list"].append(str(attrs.get('caption')))
+ self.wizard[self.lastStep]["list"].append((str(attrs.get('caption')), str(attrs.get('step'))))
elif (name == "config"):
exec "from Screens." + str(attrs.get('module')) + " import *"
self.wizard[self.lastStep]["config"]["screen"] = eval(str(attrs.get('screen')))
"right": self.right,
"up": self.up,
"down": self.down,
- #"1": self.keyNumberGlobal,
- #"2": self.keyNumberGlobal,
- #"3": self.keyNumberGlobal,
- #"4": self.keyNumberGlobal,
- #"5": self.keyNumberGlobal,
- #"6": self.keyNumberGlobal,
- #"7": self.keyNumberGlobal,
- #"8": self.keyNumberGlobal,
- #"9": self.keyNumberGlobal,
- #"0": self.keyNumberGlobal
+ "1": self.keyNumberGlobal,
+ "2": self.keyNumberGlobal,
+ "3": self.keyNumberGlobal,
+ "4": self.keyNumberGlobal,
+ "5": self.keyNumberGlobal,
+ "6": self.keyNumberGlobal,
+ "7": self.keyNumberGlobal,
+ "8": self.keyNumberGlobal,
+ "9": self.keyNumberGlobal,
+ "0": self.keyNumberGlobal
}, -1)
#self["actions"] = HelpableActionMap(self, "OkCancelActions",
#})
def ok(self):
+ if (self.wizard[self.currStep]["config"]["screen"] != None):
+ self.configInstance.run()
+
+ if (len(self.wizard[self.currStep]["list"]) > 0):
+ nextStep = self.wizard[self.currStep]["list"][self["list"].l.getCurrentSelectionIndex()][1]
+ if nextStep == "end":
+ self.currStep = self.numSteps
+ elif nextStep == "next":
+ pass
+ else:
+ self.currStep = int(nextStep) - 1
+
if (self.currStep == self.numSteps): # wizard finished
config.misc.firstrun.value = 0;
config.misc.firstrun.save()
self.currStep += 1
self.updateValues()
+ def keyNumberGlobal(self, number):
+ if (self.wizard[self.currStep]["config"]["screen"] != None):
+ self.configInstance.keyNumberGlobal(number)
+
def left(self):
if (self.wizard[self.currStep]["config"]["screen"] != None):
self.configInstance.keyLeft()
if (len(self.wizard[self.currStep]["list"]) > 0):
self["list"].instance.setZPosition(2)
for x in self.wizard[self.currStep]["list"]:
- self.list.append((x, None))
+ self.list.append((x[0], None))
self["list"].l.setList(self.list)
self["config"].instance.setZPosition(1)