git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1f99e91
)
optional 'close on any key'
author
Felix Domke
<tmbinc@elitedvb.net>
Sat, 9 Dec 2006 14:30:18 +0000
(14:30 +0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Sat, 9 Dec 2006 14:30:18 +0000
(14:30 +0000)
lib/python/Screens/MessageBox.py
patch
|
blob
|
history
diff --git
a/lib/python/Screens/MessageBox.py
b/lib/python/Screens/MessageBox.py
index 2750c9715a4a8355bc779d65a98e70b9ceb240da..f951eebfdacb22c8fe5625c5ae1dda0c41717e21 100644
(file)
--- a/
lib/python/Screens/MessageBox.py
+++ b/
lib/python/Screens/MessageBox.py
@@
-12,13
+12,14
@@
class MessageBox(Screen):
TYPE_WARNING = 2
TYPE_ERROR = 3
TYPE_WARNING = 2
TYPE_ERROR = 3
- def __init__(self, session, text, type = TYPE_YESNO, timeout = -1):
+ def __init__(self, session, text, type = TYPE_YESNO, timeout = -1
, close_on_any_key = False
):
self.type = type
Screen.__init__(self, session)
self["text"] = Label(text)
self.text = text
self.type = type
Screen.__init__(self, session)
self["text"] = Label(text)
self.text = text
+ self.close_on_any_key = close_on_any_key
self["ErrorPixmap"] = Pixmap()
self["QuestionPixmap"] = Pixmap()
self["ErrorPixmap"] = Pixmap()
self["QuestionPixmap"] = Pixmap()
@@
-102,6
+103,9
@@
class MessageBox(Screen):
self.move(self["list"].instance.pageDown)
def move(self, direction):
self.move(self["list"].instance.pageDown)
def move(self, direction):
+ if self.close_on_any_key:
+ self.close(True)
+
self["list"].instance.moveSelection(direction)
if self.timerRunning:
self.timer.stop()
self["list"].instance.moveSelection(direction)
if self.timerRunning:
self.timer.stop()