git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add timeout for MessageBox screens (just add timeout=<seconds> as argument when creat...
[enigma2.git]
/
lib
/
python
/
Screens
/
Menu.py
diff --git
a/lib/python/Screens/Menu.py
b/lib/python/Screens/Menu.py
index dd88cb5f1ee4355634cd73ee147c66b6bfe9ea52..f1a013483dba6ff255686caaed3f5f82ac0cedb1 100644
(file)
--- a/
lib/python/Screens/Menu.py
+++ b/
lib/python/Screens/Menu.py
@@
-88,9
+88,16
@@
class MenuSummary(Screen):
self["MenuTitle"] = Label(parent.menu_title)
self["MenuEntry"] = Label("")
self["Clock"] = Clock()
self["MenuTitle"] = Label(parent.menu_title)
self["MenuEntry"] = Label("")
self["Clock"] = Clock()
- parent["menu"].onSelectionChanged.append(self.selectionChanged)
self.parent = parent
self.parent = parent
+ self.onShow.append(self.addWatcher)
+ self.onHide.append(self.removeWatcher)
+
+ def addWatcher(self):
+ self.parent["menu"].onSelectionChanged.append(self.selectionChanged)
self.selectionChanged()
self.selectionChanged()
+
+ def removeWatcher(self):
+ self.parent["menu"].onSelectionChanged.remove(self.selectionChanged)
def selectionChanged(self):
self["MenuEntry"].setText(self.parent["menu"].getCurrent()[0])
def selectionChanged(self):
self["MenuEntry"].setText(self.parent["menu"].getCurrent()[0])