aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-02-25 21:29:34 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-02-25 21:29:34 +0000
commitbc8ba2d89e7c71e95c1ee8e8e2da26a993e01997 (patch)
tree5faf13746f006278f4aff1034c96e1941a91cfaf /lib/python/Screens
parentffd007cb4f71a3c9f7d69339126cbe69f6b4ee63 (diff)
downloadenigma2-bc8ba2d89e7c71e95c1ee8e8e2da26a993e01997.tar.gz
enigma2-bc8ba2d89e7c71e95c1ee8e8e2da26a993e01997.zip
- new automatic scan - scans everything the NIM can handle
- ServiceScan is now able to do a multipass scan - added the manual scan to the startwizard - wizards have a new "nextstep" attribute for the <step>-tag now
Diffstat (limited to 'lib/python/Screens')
-rw-r--r--lib/python/Screens/Console.py1
-rw-r--r--lib/python/Screens/ScanSetup.py53
-rw-r--r--lib/python/Screens/ServiceScan.py5
-rw-r--r--lib/python/Screens/Wizard.py8
4 files changed, 32 insertions, 35 deletions
diff --git a/lib/python/Screens/Console.py b/lib/python/Screens/Console.py
index d13729f8..82fc8d1c 100644
--- a/lib/python/Screens/Console.py
+++ b/lib/python/Screens/Console.py
@@ -33,6 +33,7 @@ class Console(Screen):
def startRun(self):
self["text"].setText(_("Execution Progress:") + "\n\n")
+ print "Console: executing in run", self.run, " the command:", self.cmdlist[self.run]
self.container.execute(self.cmdlist[self.run])
def runFinished(self, retval):
diff --git a/lib/python/Screens/ScanSetup.py b/lib/python/Screens/ScanSetup.py
index 1ee2f5a6..a51c1c87 100644
--- a/lib/python/Screens/ScanSetup.py
+++ b/lib/python/Screens/ScanSetup.py
@@ -10,7 +10,6 @@ from Components.Label import Label
from enigma import eDVBFrontendParametersSatellite, eComponentScan
def getInitialTransponderList(tlist, pos):
- print "pos", pos
list = nimmanager.getTransponders(pos)
for x in list:
@@ -27,12 +26,10 @@ def getInitialTransponderList(tlist, pos):
tlist.append(parm)
def getInitialCableTransponderList(tlist, cable):
- print "cable", cable
list = nimmanager.getTranspondersCable(cable)
for x in list:
if x[0] == 1: #CABLE
- print "[ScanSetup] cable-transponder to add:", x
parm = eDVBFrontendParametersCable()
parm.frequency = x[1]
parm.symbol_rate = x[2]
@@ -73,6 +70,9 @@ class ScanSetup(Screen):
self["introduction"] = Label(_("Press OK to start the scan"))
+ def run(self):
+ self.keyGo()
+
def updateSatList(self):
self.satList = []
for slot in nimmanager.nimslots:
@@ -333,7 +333,7 @@ class ScanSetup(Screen):
feid = config.scan.nims.value
# flags |= eComponentScan.scanSearchBAT
- self.session.openWithCallback(self.doNothing, ServiceScan, tlist, feid, flags)
+ self.session.openWithCallback(self.doNothing, ServiceScan, [{"transponders": tlist, "feid": feid, "flags": flags}])
#self.close()
def doNothing(self):
@@ -345,29 +345,24 @@ class ScanSetup(Screen):
self.close()
class ScanSimple(Screen):
-
def run(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)
-
+ self.keyGo()
def keyGo(self):
- print "start scan for sats:"
- tlist = [ ]
+ scanList = []
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)
+ slotid = x[1].parent.configPath
+ print "configpath:", x[1].parent.configPath, "-", currentConfigSelectionElement(x[1].parent)
+ if currentConfigSelectionElement(x[1].parent) == "yes":
+ tlist = [ ]
+ if nimmanager.getNimType(x[1].parent.configPath) == nimmanager.nimType["DVB-S"]:
+ SatList = nimmanager.getSatListForNim(slotid)
+ for sat in SatList:
+ getInitialTransponderList(tlist, sat[1])
+ elif nimmanager.getNimType(x[1].parent.configPath) == nimmanager.nimType["DVB-C"]:
+ getInitialCableTransponderList(tlist, nimmanager.getCableDescription(slotid))
+ scanList.append({"transponders": tlist, "feid": slotid, "flags": eComponentScan.scanNetworkSearch})
+ self.session.openWithCallback(self.doNothing, ServiceScan, scanList = scanList)
def doNothing(self):
pass
@@ -401,15 +396,9 @@ class ScanSimple(Screen):
self.list = []
tlist = []
-
- for slotid in nimmanager.getNimListOfType(nimmanager.nimType["DVB-S"]):
- SatList = nimmanager.getSatListForNim(slotid)
-
- for x in SatList:
- if self.Satexists(tlist, x[1]) == 0:
- tlist.append(x[1])
- sat = configElement_nonSave(x[1], configSelection, 0, (("enable", _("Enable")), ("disable", _("Disable"))))
- self.list.append(getConfigListEntry(nimmanager.getSatDescription(x[1]), sat))
+ for slotid in range(nimmanager.getNimSocketCount()):
+ nim = configElement_nonSave(slotid, configSelection, 0, (("yes", _("yes")), ("no", _("no"))))
+ self.list.append(getConfigListEntry(_("Scan NIM") + " " + str(slotid) + " (" + nimmanager.getNimTypeName(slotid) + ")", nim))
self["config"] = ConfigList(self.list)
self["header"] = Label(_("Automatic Scan"))
diff --git a/lib/python/Screens/ServiceScan.py b/lib/python/Screens/ServiceScan.py
index b09353f0..772141a6 100644
--- a/lib/python/Screens/ServiceScan.py
+++ b/lib/python/Screens/ServiceScan.py
@@ -14,15 +14,16 @@ class ServiceScan(Screen):
def cancel(self):
self.close()
- def __init__(self, session, transponders, feid, flags):
+ def __init__(self, session, scanList):
Screen.__init__(self, session)
self.session.nav.stopService()
self["scan_progress"] = ProgressBar()
self["scan_state"] = Label(_("scan state"))
+ self["pass"] = Label("")
self["servicelist"] = FIFOList(len=7)
- self["scan"] = CScan(self["scan_progress"], self["scan_state"], self["servicelist"], transponders, feid, flags)
+ self["scan"] = CScan(self["scan_progress"], self["scan_state"], self["servicelist"], self["pass"], scanList)
self["actions"] = ActionMap(["OkCancelActions"],
{
diff --git a/lib/python/Screens/Wizard.py b/lib/python/Screens/Wizard.py
index 43931576..c91639c4 100644
--- a/lib/python/Screens/Wizard.py
+++ b/lib/python/Screens/Wizard.py
@@ -31,7 +31,11 @@ class Wizard(Screen, HelpableScreen):
id = str(attrs.get('id'))
else:
id = ""
- self.wizard[self.lastStep] = {"id": id, "condition": "", "text": "", "list": [], "config": {"screen": None, "args": None, "type": "" }, "code": "", "codeafter": ""}
+ if attrs.has_key('nextstep'):
+ nextstep = str(attrs.get('nextstep'))
+ else:
+ nextstep = None
+ self.wizard[self.lastStep] = {"id": id, "condition": "", "text": "", "list": [], "config": {"screen": None, "args": None, "type": "" }, "code": "", "codeafter": "", "nextstep": nextstep}
elif (name == "text"):
self.wizard[self.lastStep]["text"] = string.replace(str(attrs.get('value')), "\\n", "\n")
elif (name == "listentry"):
@@ -160,6 +164,8 @@ class Wizard(Screen, HelpableScreen):
self.session.close()
else:
self.runCode(self.wizard[self.currStep]["codeafter"])
+ if self.wizard[self.currStep]["nextstep"] is not None:
+ self.currStep = self.getStepWithID(self.wizard[self.currStep]["nextstep"])
self.currStep += 1
self.updateValues()