some work on the timer sanity check (overlapping timers solver)
[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
8 class ServiceScan(Screen):
9         def ok(self):
10                 print "ok"
11                 if self["scan"].isDone():
12                         self.close()
13         
14         def cancel(self):
15                 self.close()
16         
17         def __init__(self, session, transponders, feid, flags):
18                 Screen.__init__(self, session)
19                 
20                 self.session.nav.stopService()
21                 
22                 self["scan_progress"] = ProgressBar()
23                 self["scan_state"] = Label(_("scan state"))
24                 self["servicelist"] = FIFOList(len=7)
25                 self["scan"] = CScan(self["scan_progress"], self["scan_state"], self["servicelist"], transponders, feid, flags)
26
27                 self["actions"] = ActionMap(["OkCancelActions"], 
28                         {
29                                 "ok": self.ok,
30                                 "cancel": self.cancel
31                         })