git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix imports
[enigma2.git]
/
lib
/
python
/
Screens
/
MessageBox.py
diff --git
a/lib/python/Screens/MessageBox.py
b/lib/python/Screens/MessageBox.py
index e9c0786ff7d64811aeed0872fe2e568512fed9a1..0133de2a5038e1ebc9086b63375c6a541b901f6a 100644
(file)
--- a/
lib/python/Screens/MessageBox.py
+++ b/
lib/python/Screens/MessageBox.py
@@
-1,10
+1,9
@@
from Screen import Screen
from Components.ActionMap import ActionMap
from Components.Label import Label
from Screen import Screen
from Components.ActionMap import ActionMap
from Components.Label import Label
-from Components.Button import Button
from Components.Pixmap import Pixmap
from Components.MenuList import MenuList
from Components.Pixmap import Pixmap
from Components.MenuList import MenuList
-from enigma import e
Size, ePoint, e
Timer
+from enigma import eTimer
class MessageBox(Screen):
TYPE_YESNO = 0
class MessageBox(Screen):
TYPE_YESNO = 0
@@
-62,17
+61,18
@@
class MessageBox(Screen):
self.timer.timeout.get().append(self.timerTick)
self.onExecBegin.append(self.startTimer)
self.origTitle = None
self.timer.timeout.get().append(self.timerTick)
self.onExecBegin.append(self.startTimer)
self.origTitle = None
- try:
- if self.instance and self.instance.isVisible():
- self.timerTick()
- else:
- self.onShown.append(self.timerTick)
- except AttributeError:
- self.onShown.append(self.timerTick)
+ if self.execing:
+ self.timerTick()
+ else:
+ self.onShown.append(self.__onShown)
self.timerRunning = True
else:
self.timerRunning = False
self.timerRunning = True
else:
self.timerRunning = False
+ def __onShown(self):
+ self.onShown.remove(self.__onShown)
+ self.timerTick()
+
def startTimer(self):
self.timer.start(1000)
def startTimer(self):
self.timer.start(1000)
@@
-80,7
+80,7
@@
class MessageBox(Screen):
if self.timerRunning:
del self.timer
self.setTitle(self.origTitle)
if self.timerRunning:
del self.timer
self.setTitle(self.origTitle)
- self.
onShown.remove(self.timerTick)
+ self.
timerRunning = False
def timerTick(self):
if self.execing:
def timerTick(self):
if self.execing:
@@
-124,12
+124,8
@@
class MessageBox(Screen):
def move(self, direction):
if self.close_on_any_key:
self.close(True)
def move(self, direction):
if self.close_on_any_key:
self.close(True)
-
self["list"].instance.moveSelection(direction)
self["list"].instance.moveSelection(direction)
- if self.timerRunning:
- self.timer.stop()
- self.setTitle(self.origTitle)
- self.timerRunning = False
+ self.stopTimer()
def __repr__(self):
return str(type(self)) + "(" + self.text + ")"
def __repr__(self):
return str(type(self)) + "(" + self.text + ")"