diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-01-07 02:02:44 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-01-07 02:02:44 +0000 |
| commit | 3d9be241bd3d4558ee28e57bbe405553b8626543 (patch) | |
| tree | be4cca06e8fe1c68010b013670e2ffa355689f55 /lib/python | |
| parent | dc1e6fcd9c08ddbc1d224710651826cd682ed63e (diff) | |
| download | enigma2-3d9be241bd3d4558ee28e57bbe405553b8626543.tar.gz enigma2-3d9be241bd3d4558ee28e57bbe405553b8626543.zip | |
nice code
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Screens/MessageBox.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/python/Screens/MessageBox.py b/lib/python/Screens/MessageBox.py index 6c7bdd3c..deea54ba 100644 --- a/lib/python/Screens/MessageBox.py +++ b/lib/python/Screens/MessageBox.py @@ -62,17 +62,18 @@ class MessageBox(Screen): 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 + def __onShown(self): + self.onShown.remove(self.__onShown) + self.timerTick() + def startTimer(self): self.timer.start(1000) @@ -80,7 +81,6 @@ class MessageBox(Screen): if self.timerRunning: del self.timer self.setTitle(self.origTitle) - self.onShown.remove(self.timerTick) def timerTick(self): if self.execing: |
