git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
53cccbd
)
add destroy() for Components to fix bug #52
author
Felix Domke
<tmbinc@elitedvb.net>
Sun, 9 Apr 2006 21:56:50 +0000
(21:56 +0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Sun, 9 Apr 2006 21:56:50 +0000
(21:56 +0000)
lib/python/Components/ActionMap.py
patch
|
blob
|
history
lib/python/Components/GUIComponent.py
patch
|
blob
|
history
lib/python/Components/PerServiceDisplay.py
patch
|
blob
|
history
lib/python/Screens/Screen.py
patch
|
blob
|
history
diff --git
a/lib/python/Components/ActionMap.py
b/lib/python/Components/ActionMap.py
index a6f5eb9c9773743861bb45995c549f965208ae16..ee3d31db615d0da035f11b821480d8616f3810bb 100644
(file)
--- 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
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"]
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 493df681482f4fd96c3acb4c625d2770dbbc511d..8f6362fdadbe88407c4b045aec8cd6042631fdc2 100644
(file)
--- a/
lib/python/Components/GUIComponent.py
+++ b/
lib/python/Components/GUIComponent.py
@@
-24,6
+24,9
@@
class GUIComponent:
def onHide(self):
pass
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:
# 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 55ef3d18672509e756618b610a058a7fba24f7e5..821f6d165bc2a070a271761e59de42dd0948b5a2 100644
(file)
--- 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)
# 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):
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 8398dadd0fb17169c3828173d4bd29691452725c..d4b3d729e32ac11ceb2de790d7d40a291c2429d1 100644
(file)
--- 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():
del self.session
for (name, val) in self.items():
+ val.destroy()
del self[name]
# really delete all elements now
del self[name]
# really delete all elements now