diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-12-09 14:30:18 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-12-09 14:30:18 +0000 |
| commit | c49fe33f5c6a185d9350d5b63762eea447dd71a6 (patch) | |
| tree | a7e35cc0d50138450ab9d7b261501484732647a9 /lib/python/Screens/MessageBox.py | |
| parent | 1f99e91b81a21d2102fedd37fb0a590d40d5d3ef (diff) | |
| download | enigma2-c49fe33f5c6a185d9350d5b63762eea447dd71a6.tar.gz enigma2-c49fe33f5c6a185d9350d5b63762eea447dd71a6.zip | |
optional 'close on any key'
Diffstat (limited to 'lib/python/Screens/MessageBox.py')
| -rw-r--r-- | lib/python/Screens/MessageBox.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/python/Screens/MessageBox.py b/lib/python/Screens/MessageBox.py index 2750c971..f951eebf 100644 --- 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 - 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.close_on_any_key = close_on_any_key self["ErrorPixmap"] = Pixmap() self["QuestionPixmap"] = Pixmap() @@ -102,6 +103,9 @@ class MessageBox(Screen): 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() |
