aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/ServiceScan.py
blob: 390abff0a7721723e863107dfa63c7be516b758f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from Screen import Screen
from Components.ServiceScan import ServiceScan as CScan
from Components.ProgressBar import ProgressBar
from Components.Label import Label
from Components.ActionMap import ActionMap

class ServiceScan(Screen):
	def ok(self):
		print "ok"
		if self["scan"].isDone():
			self.close()
	
	def cancel(self):
		self.close()
	
	def __init__(self, session):
		Screen.__init__(self, session)
		
		self["scan_progress"] = ProgressBar()
		self["scan_state"] = Label("scan state")
		self["scan"] = CScan(self["scan_progress"], self["scan_state"])

		self["actions"] = ActionMap(["OkCancelActions"], 
			{
				"ok": self.ok,
				"cancel": self.cancel
			})