aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Components/ActionMap.py3
-rw-r--r--lib/python/Components/GUIComponent.py3
-rw-r--r--lib/python/Components/PerServiceDisplay.py3
-rw-r--r--lib/python/Screens/Screen.py1
4 files changed, 10 insertions, 0 deletions
diff --git a/lib/python/Components/ActionMap.py b/lib/python/Components/ActionMap.py
index a6f5eb9c..ee3d31db 100644
--- a/lib/python/Components/ActionMap.py
+++ b/lib/python/Components/ActionMap.py
@@ -50,6 +50,9 @@ class ActionMap:
print "unknown action %s/%s! typo in keymap?" % (context, action)
return 0
+ def destroy(self):
+ pass
+
class NumberActionMap(ActionMap):
def action(self, contexts, action):
numbers = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
diff --git a/lib/python/Components/GUIComponent.py b/lib/python/Components/GUIComponent.py
index 493df681..8f6362fd 100644
--- a/lib/python/Components/GUIComponent.py
+++ b/lib/python/Components/GUIComponent.py
@@ -24,6 +24,9 @@ class GUIComponent:
def onHide(self):
pass
+ def destroy(self):
+ pass
+
# this works only with normal widgets - if you don't have self.instance, override this.
def applySkin(self, desktop):
if self.state == self.HIDDEN:
diff --git a/lib/python/Components/PerServiceDisplay.py b/lib/python/Components/PerServiceDisplay.py
index 55ef3d18..821f6d16 100644
--- a/lib/python/Components/PerServiceDisplay.py
+++ b/lib/python/Components/PerServiceDisplay.py
@@ -17,6 +17,9 @@ class PerServiceBase(GUIComponent):
# start with stopped state, so simulate that
self.event(iPlayableService.evEnd)
+ def destroy(self):
+ self.navcore.event.remove(self.event)
+
def event(self, ev):
# loop up if we need to handle this event
if self.eventmap.has_key(ev):
diff --git a/lib/python/Screens/Screen.py b/lib/python/Screens/Screen.py
index 8398dadd..d4b3d729 100644
--- a/lib/python/Screens/Screen.py
+++ b/lib/python/Screens/Screen.py
@@ -67,6 +67,7 @@ class Screen(dict, HTMLSkin, GUISkin):
del self.session
for (name, val) in self.items():
+ val.destroy()
del self[name]
# really delete all elements now