make messagebox look better and translate it
[enigma2.git] / lib / python / Screens / MessageBox.py
1 from Screen import Screen
2 from Components.ActionMap import ActionMap
3 from Components.Label import Label
4 from Components.Button import Button
5 from enigma import eSize, ePoint
6
7 class MessageBox(Screen):
8         def __init__(self, session, text):
9                 Screen.__init__(self, session)
10                 
11                 self["text"] = Label(text)
12                 
13                 self["key_green"] = Button("OK")
14                 self["key_red"] = Button("Exit")
15
16                 self["actions"] = ActionMap(["OkCancelActions"], 
17                         {
18                                 "cancel": self.cancel,
19                                 "ok": self.ok
20                         })
21                         
22         
23         def cancel(self):
24                 self.close(False)
25         
26         def ok(self):
27                 self.close(True)