fix
[enigma2.git] / lib / python / Screens / Menu.py
index dd88cb5f1ee4355634cd73ee147c66b6bfe9ea52..f1a013483dba6ff255686caaed3f5f82ac0cedb1 100644 (file)
@@ -88,9 +88,16 @@ class MenuSummary(Screen):
                self["MenuTitle"] = Label(parent.menu_title)
                self["MenuEntry"] = Label("")
                self["Clock"] = Clock()
-               parent["menu"].onSelectionChanged.append(self.selectionChanged)
                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()
+       
+       def removeWatcher(self):
+               self.parent["menu"].onSelectionChanged.remove(self.selectionChanged)
 
        def selectionChanged(self):
                self["MenuEntry"].setText(self.parent["menu"].getCurrent()[0])