a lot of new wizard functionality
[enigma2.git] / lib / python / Screens / ServiceScan.py
1 from Screen import Screen
2 from Components.ServiceScan import ServiceScan as CScan
3 from Components.ProgressBar import ProgressBar
4 from Components.Label import Label
5 from Components.ActionMap import ActionMap
6 from Components.FIFOList import FIFOList
7 from Components.Sources.FrontendInfo import FrontendInfo
8
9 class ServiceScan(Screen):
10         def ok(self):
11                 print "ok"
12                 if self["scan"].isDone():
13                         self.close()
14         
15         def cancel(self):
16                 self.close()
17         
18         def __init__(self, session, scanList):
19                 Screen.__init__(self, session)
20                 
21                 self.session.nav.stopService()
22                 
23                 self["scan_progress"] = ProgressBar()
24                 self["scan_state"] = Label(_("scan state"))
25                 self["network"] = Label()
26                 self["transponder"] = Label()
27
28                 self["pass"] = Label("")
29                 self["servicelist"] = FIFOList(len=10)
30                 self["FrontendInfo"] = FrontendInfo()
31                 self["scan"] = CScan(self["scan_progress"], self["scan_state"], self["servicelist"], self["pass"], scanList, self["network"], self["transponder"], self["FrontendInfo"])
32
33                 self["actions"] = ActionMap(["OkCancelActions"], 
34                         {
35                                 "ok": self.ok,
36                                 "cancel": self.cancel
37                         })