aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/MessageBox.py
blob: 872996571c4e68d3a88778efff2530247139d59f (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.ActionMap import ActionMap
from Components.Label import Label
from Components.Button import Button
from enigma import eSize, ePoint

class MessageBox(Screen):
	def __init__(self, session, text):
		Screen.__init__(self, session)
		
		self["text"] = Label(text)
		
		self["key_green"] = Button("OK")
		self["key_red"] = Button("Exit")

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