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:
6f73e6a
)
unlink some cyclic dependencys to get garbage collection working
author
Andreas Monzner
<andreas.monzner@multimedia-labs.de>
Thu, 14 Feb 2008 20:40:05 +0000
(20:40 +0000)
committer
Andreas Monzner
<andreas.monzner@multimedia-labs.de>
Thu, 14 Feb 2008 20:40:05 +0000
(20:40 +0000)
20 files changed:
lib/python/Components/Button.py
patch
|
blob
|
history
lib/python/Components/ConfigList.py
patch
|
blob
|
history
lib/python/Components/Converter/ConditionalShowHide.py
patch
|
blob
|
history
lib/python/Components/Converter/Poll.py
patch
|
blob
|
history
lib/python/Components/EpgList.py
patch
|
blob
|
history
lib/python/Components/HelpMenuList.py
patch
|
blob
|
history
lib/python/Components/Ipkg.py
patch
|
blob
|
history
lib/python/Components/MenuList.py
patch
|
blob
|
history
lib/python/Components/MovieList.py
patch
|
blob
|
history
lib/python/Components/Renderer/Listbox.py
patch
|
blob
|
history
lib/python/Components/ServiceList.py
patch
|
blob
|
history
lib/python/Components/Sources/Boolean.py
patch
|
blob
|
history
lib/python/Components/Sources/Clock.py
patch
|
blob
|
history
lib/python/Components/Sources/FrontendStatus.py
patch
|
blob
|
history
lib/python/Plugins/Extensions/CutListEditor/plugin.py
patch
|
blob
|
history
lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py
patch
|
blob
|
history
lib/python/Plugins/Extensions/SimpleRSS/plugin.py
patch
|
blob
|
history
lib/python/Screens/Console.py
patch
|
blob
|
history
lib/python/Screens/PluginBrowser.py
patch
|
blob
|
history
lib/python/Screens/ScanSetup.py
patch
|
blob
|
history
diff --git
a/lib/python/Components/Button.py
b/lib/python/Components/Button.py
index 25346b42f055dd19bd8bfae74eb0e9aed1ac68d6..2a60a98fa9a241e1f1083653127505442cb4e7cb 100644
(file)
--- a/
lib/python/Components/Button.py
+++ b/
lib/python/Components/Button.py
@@
-31,3
+31,6
@@
class Button(VariableText, HTMLComponent, GUIComponent):
def postWidgetCreate(self, instance):
instance.setText(self.text)
instance.selected.get().append(self.push)
def postWidgetCreate(self, instance):
instance.setText(self.text)
instance.selected.get().append(self.push)
+
+ def preWidgetRemove(self, instance):
+ instance.selected.get().remove(self.push)
diff --git
a/lib/python/Components/ConfigList.py
b/lib/python/Components/ConfigList.py
index d1b295baedff92dceff541a19474f26e0f4aca25..9a68d428a32b08f132597dad4167f5235813d0f1 100644
(file)
--- a/
lib/python/Components/ConfigList.py
+++ b/
lib/python/Components/ConfigList.py
@@
-24,7
+24,7
@@
class ConfigList(HTMLComponent, GUIComponent, object):
def execEnd(self):
rcinput = eRCInput.getInstance()
rcinput.setKeyboardMode(rcinput.kmNone)
def execEnd(self):
rcinput = eRCInput.getInstance()
rcinput.setKeyboardMode(rcinput.kmNone)
- self.timer.
timeout.get()
.remove(self.timeout)
+ self.timer.
callback
.remove(self.timeout)
def toggle(self):
selection = self.getCurrent()
def toggle(self):
selection = self.getCurrent()
@@
-77,6
+77,7
@@
class ConfigList(HTMLComponent, GUIComponent, object):
if self.current:
self.current[1].onDeselect(self.session)
instance.selectionChanged.get().remove(self.selectionChanged)
if self.current:
self.current[1].onDeselect(self.session)
instance.selectionChanged.get().remove(self.selectionChanged)
+ instance.setContent(None)
def setList(self, l):
self.timer.stop()
def setList(self, l):
self.timer.stop()
diff --git
a/lib/python/Components/Converter/ConditionalShowHide.py
b/lib/python/Components/Converter/ConditionalShowHide.py
index f5ec7039a875ccfb27ee0f18abaea255c7de7ceb..de3df8fa171a2fec6cfa184e6d50d0a6590e1975 100644
(file)
--- a/
lib/python/Components/Converter/ConditionalShowHide.py
+++ b/
lib/python/Components/Converter/ConditionalShowHide.py
@@
-61,4
+61,4
@@
class ConditionalShowHide(Converter, object):
def destroy(self):
if self.timer:
def destroy(self):
if self.timer:
- self.timer.
timeout.get()
.remove(self.blinkFunc)
+ self.timer.
callback
.remove(self.blinkFunc)
diff --git
a/lib/python/Components/Converter/Poll.py
b/lib/python/Components/Converter/Poll.py
index 33b9f3056748e3b9a7043fc66d96adf5b345c403..6db93ef5801319af6e6cd51fde726a67ee3eb2ec 100644
(file)
--- a/
lib/python/Components/Converter/Poll.py
+++ b/
lib/python/Components/Converter/Poll.py
@@
-30,4
+30,4
@@
class Poll(object):
self.poll()
def destroy(self):
self.poll()
def destroy(self):
- self.__poll_timer.
timeout.get()
.remove(self.poll)
+ self.__poll_timer.
callback
.remove(self.poll)
diff --git
a/lib/python/Components/EpgList.py
b/lib/python/Components/EpgList.py
index 97ed0a03acb791b1fb4e75f6f66742ebe1df040c..e0d5227c4525453d9be7a2c0ea857b06e8dec994 100644
(file)
--- a/
lib/python/Components/EpgList.py
+++ b/
lib/python/Components/EpgList.py
@@
-99,12
+99,16
@@
class EPGList(HTMLComponent, GUIComponent):
pass
GUI_WIDGET = eListbox
pass
GUI_WIDGET = eListbox
-
+
def postWidgetCreate(self, instance):
instance.setWrapAround(True)
instance.selectionChanged.get().append(self.selectionChanged)
instance.setContent(self.l)
def postWidgetCreate(self, instance):
instance.setWrapAround(True)
instance.selectionChanged.get().append(self.selectionChanged)
instance.setContent(self.l)
+ def preWidgetRemove(self, instance):
+ instance.selectionChanged.get().remove(self.selectionChanged)
+ instance.setContent(None)
+
def recalcEntrySize(self):
esize = self.l.getItemSize()
self.l.setFont(0, gFont("Regular", 22))
def recalcEntrySize(self):
esize = self.l.getItemSize()
self.l.setFont(0, gFont("Regular", 22))
diff --git
a/lib/python/Components/HelpMenuList.py
b/lib/python/Components/HelpMenuList.py
index 07bbdd2a9a1f2127f51be98ce4cbecc956e073ac..3d36e95838a902fc0929a4f69de05dd3b08cd831 100644
(file)
--- a/
lib/python/Components/HelpMenuList.py
+++ b/
lib/python/Components/HelpMenuList.py
@@
-63,9
+63,12
@@
class HelpMenuList(GUIComponent):
def postWidgetCreate(self, instance):
instance.setContent(self.l)
def postWidgetCreate(self, instance):
instance.setContent(self.l)
-
instance.selectionChanged.get().append(self.selectionChanged)
instance.selectionChanged.get().append(self.selectionChanged)
+ def preWidgetRemove(self, instance):
+ instance.setContent(None)
+ instance.selectionChanged.get().remove(self.selectionChanged)
+
def selectionChanged(self):
for x in self.onSelChanged:
x()
def selectionChanged(self):
for x in self.onSelChanged:
x()
diff --git
a/lib/python/Components/Ipkg.py
b/lib/python/Components/Ipkg.py
index eac264289ff76dcb0eb1d738551d6fcf833feac6..361b136a8718f175334e51863c3890e2e2b89ec1 100644
(file)
--- a/
lib/python/Components/Ipkg.py
+++ b/
lib/python/Components/Ipkg.py
@@
-22,10
+22,7
@@
class IpkgComponent:
self.ipkg = ipkg
self.cmd = eConsoleAppContainer()
self.ipkg = ipkg
self.cmd = eConsoleAppContainer()
- self.cmd.appClosed.get().append(self.cmdFinished)
- self.cmd.dataAvail.get().append(self.cmdData)
self.cache = None
self.cache = None
-
self.callbackList = []
self.setCurrentCommand()
self.callbackList = []
self.setCurrentCommand()
@@
-34,8
+31,11
@@
class IpkgComponent:
def runCmd(self, cmd):
print "executing", self.ipkg, cmd
def runCmd(self, cmd):
print "executing", self.ipkg, cmd
- self.cmd.execute(self.ipkg + " " + cmd)
-
+ self.cmd.appClosed.get().append(self.cmdFinished)
+ self.cmd.dataAvail.get().append(self.cmdData)
+ if self.cmd.execute(self.ipkg + " " + cmd):
+ self.cmdFinished(-1)
+
def startCmd(self, cmd, args = None):
if cmd == self.CMD_UPDATE:
self.runCmd("update")
def startCmd(self, cmd, args = None):
if cmd == self.CMD_UPDATE:
self.runCmd("update")
@@
-56,7
+56,9
@@
class IpkgComponent:
def cmdFinished(self, retval):
self.callCallbacks(self.EVENT_DONE)
def cmdFinished(self, retval):
self.callCallbacks(self.EVENT_DONE)
-
+ self.cmd.appClosed.get().remove(self.cmdFinished)
+ self.cmd.dataAvail.get().remove(self.cmdData)
+
def cmdData(self, data):
print "data:", data
if self.cache is None:
def cmdData(self, data):
print "data:", data
if self.cache is None:
diff --git
a/lib/python/Components/MenuList.py
b/lib/python/Components/MenuList.py
index 876300bd615a59741c574d1a25558bfe60002ed7..dbdf00a476bbe26dd75417befb6d2b1dd2378422 100644
(file)
--- a/
lib/python/Components/MenuList.py
+++ b/
lib/python/Components/MenuList.py
@@
-25,6
+25,7
@@
class MenuList(HTMLComponent, GUIComponent):
def preWidgetRemove(self, instance):
instance.setContent(None)
def preWidgetRemove(self, instance):
instance.setContent(None)
+ instance.selectionChanged.get().remove(self.selectionChanged)
def selectionChanged(self):
for f in self.onSelectionChanged:
def selectionChanged(self):
for f in self.onSelectionChanged:
diff --git
a/lib/python/Components/MovieList.py
b/lib/python/Components/MovieList.py
index 6a2640982d12900315673236134378f92dbf9999..07dd1152f72d7ac5428fa142e7613860a38dcc55 100644
(file)
--- a/
lib/python/Components/MovieList.py
+++ b/
lib/python/Components/MovieList.py
@@
-153,6
+153,10
@@
class MovieList(GUIComponent):
instance.setContent(self.l)
instance.selectionChanged.get().append(self.selectionChanged)
instance.setContent(self.l)
instance.selectionChanged.get().append(self.selectionChanged)
+ def preWidgetRemove(self, instance):
+ instance.setContent(None)
+ instance.selectionChanged.get().remove(self.selectionChanged)
+
def reload(self, root = None, filter_tags = None):
if root is not None:
self.load(root, filter_tags)
def reload(self, root = None, filter_tags = None):
if root is not None:
self.load(root, filter_tags)
diff --git
a/lib/python/Components/Renderer/Listbox.py
b/lib/python/Components/Renderer/Listbox.py
index 7c79acb74429484345761b7e447cd8a51eddddef..8e510b4c09aae51490f2fa1b24586b5cc5ab5cc8 100644
(file)
--- a/
lib/python/Components/Renderer/Listbox.py
+++ b/
lib/python/Components/Renderer/Listbox.py
@@
-39,6
+39,10
@@
class Listbox(Renderer, object):
self.wrap_around = self.wrap_around # trigger
self.selection_enabled = self.selection_enabled # trigger
self.wrap_around = self.wrap_around # trigger
self.selection_enabled = self.selection_enabled # trigger
+ def preWidgetRemove(self, instance):
+ instance.setContent(None)
+ instance.selectionChanged.get().remove(self.selectionChanged)
+
def setWrapAround(self, wrap_around):
self.__wrap_around = wrap_around
if self.instance is not None:
def setWrapAround(self, wrap_around):
self.__wrap_around = wrap_around
if self.instance is not None:
diff --git
a/lib/python/Components/ServiceList.py
b/lib/python/Components/ServiceList.py
index e39b1d0271dbc2284a36d70f2765104db7b9d680..2ed32647826e40cf2af58423b6dceede43dace2d 100644
(file)
--- a/
lib/python/Components/ServiceList.py
+++ b/
lib/python/Components/ServiceList.py
@@
-131,6
+131,10
@@
class ServiceList(HTMLComponent, GUIComponent):
instance.selectionChanged.get().append(self.selectionChanged)
self.setMode(self.mode)
instance.selectionChanged.get().append(self.selectionChanged)
self.setMode(self.mode)
+ def preWidgetRemove(self, instance):
+ instance.setContent(None)
+ instance.selectionChanged.get().remove(self.selectionChanged)
+
def getRoot(self):
return self.root
def getRoot(self):
return self.root
diff --git
a/lib/python/Components/Sources/Boolean.py
b/lib/python/Components/Sources/Boolean.py
index 97b92bc6da9c19f483223d130f28d61950c5fecb..f2526a451a50930e2702f65f3f13748db32aae21 100644
(file)
--- a/
lib/python/Components/Sources/Boolean.py
+++ b/
lib/python/Components/Sources/Boolean.py
@@
-35,4
+35,4
@@
class Boolean(Source, object):
def destroy(self):
if self.poll_timer:
def destroy(self):
if self.poll_timer:
- self.poll_timer.
timeout.get()
.remove(self.poll)
+ self.poll_timer.
callback
.remove(self.poll)
diff --git
a/lib/python/Components/Sources/Clock.py
b/lib/python/Components/Sources/Clock.py
index 60fa7ac2807bfefb4a1ed5f9013d29c159c9eb5d..5130b21db01bf44d11d837f08eb9ecbca6c07d97 100644
(file)
--- a/
lib/python/Components/Sources/Clock.py
+++ b/
lib/python/Components/Sources/Clock.py
@@
-28,4
+28,4
@@
class Clock(Source):
self.poll()
def destroy(self):
self.poll()
def destroy(self):
- self.clock_timer.
timeout.get()
.remove(self.poll)
+ self.clock_timer.
callback
.remove(self.poll)
diff --git
a/lib/python/Components/Sources/FrontendStatus.py
b/lib/python/Components/Sources/FrontendStatus.py
index 141bd8a47763fda4d1ce05b9d85d8a3233f42af5..8e29030ac5455d3ca6d13dda9287f83b8ec074fa 100644
(file)
--- a/
lib/python/Components/Sources/FrontendStatus.py
+++ b/
lib/python/Components/Sources/FrontendStatus.py
@@
-48,5
+48,5
@@
class FrontendStatus(Source):
self.poll_timer.start(self.update_interval)
def destroy(self):
self.poll_timer.start(self.update_interval)
def destroy(self):
- self.poll_timer.
timeout.get()
.remove(self.updateFrontendStatus)
+ self.poll_timer.
callback
.remove(self.updateFrontendStatus)
diff --git
a/lib/python/Plugins/Extensions/CutListEditor/plugin.py
b/lib/python/Plugins/Extensions/CutListEditor/plugin.py
index 200e37ccc639ec21742d5ac134c9b07ef48d381c..6f793d7f1fd2c38b90d9fa98bd6fa518d0e5d0e9 100644
(file)
--- a/
lib/python/Plugins/Extensions/CutListEditor/plugin.py
+++ b/
lib/python/Plugins/Extensions/CutListEditor/plugin.py
@@
-121,6
+121,10
@@
class CutList(GUIComponent):
instance.setItemHeight(30)
instance.selectionChanged.get().append(self.selectionChanged)
instance.setItemHeight(30)
instance.selectionChanged.get().append(self.selectionChanged)
+ def preWidgetRemove(self, instance):
+ instance.setContent(None)
+ instance.selectionChanged.get().remove(self.selectionChanged)
+
def selectionChanged(self):
for x in self.onSelectionChanged:
x()
def selectionChanged(self):
for x in self.onSelectionChanged:
x()
diff --git
a/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py
b/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py
index 80a07df4918d014f62506c0c76f1d068b6ba037f..6743161f7e68675e27ee0612f4b44aabe8038cad 100644
(file)
--- a/
lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py
+++ b/
lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py
@@
-170,6
+170,10
@@
class EPGList(HTMLComponent, GUIComponent):
self.l.setFont(1, gFont("Regular", 14))
self.l.setSelectionClip(eRect(0,0,0,0), False)
self.l.setFont(1, gFont("Regular", 14))
self.l.setSelectionClip(eRect(0,0,0,0), False)
+ def preWidgetRemove(self, instance):
+ instance.selectionChanged.get().remove(self.serviceChanged)
+ instance.setContent(None)
+
def recalcEntrySize(self):
esize = self.l.getItemSize()
width = esize.width()
def recalcEntrySize(self):
esize = self.l.getItemSize()
width = esize.width()
diff --git
a/lib/python/Plugins/Extensions/SimpleRSS/plugin.py
b/lib/python/Plugins/Extensions/SimpleRSS/plugin.py
index 3c96dd448a9dd827fd4d7c7f78c7d227dc086e95..608d4720df7dafdf250806394bd029e82cecd864 100644
(file)
--- a/
lib/python/Plugins/Extensions/SimpleRSS/plugin.py
+++ b/
lib/python/Plugins/Extensions/SimpleRSS/plugin.py
@@
-231,7
+231,7
@@
class RSSPoller:
self.d = getPage(config.simpleRSS.hostname.value).addCallback(self._gotPage).addErrback(self.error)
def shutdown(self):
self.d = getPage(config.simpleRSS.hostname.value).addCallback(self._gotPage).addErrback(self.error)
def shutdown(self):
- self.poll_timer.
timeout.get()
.remove(self.poll)
+ self.poll_timer.
callback
.remove(self.poll)
self.poll_timer = None
def main(session, **kwargs):
self.poll_timer = None
def main(session, **kwargs):
diff --git
a/lib/python/Screens/Console.py
b/lib/python/Screens/Console.py
index 622fb447973d76005d738a90546bc3077d3c2c64..d71a7a82179b17270a8456d69b675dadc2259d1d 100644
(file)
--- a/
lib/python/Screens/Console.py
+++ b/
lib/python/Screens/Console.py
@@
-63,6
+63,8
@@
class Console(Screen):
def cancel(self):
if self.run == len(self.cmdlist):
self.close()
def cancel(self):
if self.run == len(self.cmdlist):
self.close()
+ self.container.appClosed.get().remove(self.runFinished)
+ self.container.dataAvail.get().remove(self.dataAvail)
def dataAvail(self, str):
self["text"].setText(self["text"].getText() + str)
def dataAvail(self, str):
self["text"].setText(self["text"].getText() + str)
diff --git
a/lib/python/Screens/PluginBrowser.py
b/lib/python/Screens/PluginBrowser.py
index fbbc128dd42dd89b0131e7432cf1a26a1c67ec6c..3b4ff116c98f5be68ecf6d2ada13cc900c861abb 100644
(file)
--- a/
lib/python/Screens/PluginBrowser.py
+++ b/
lib/python/Screens/PluginBrowser.py
@@
-141,8
+141,10
@@
class PluginDownloadBrowser(Screen):
def installFinished(self):
plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
def installFinished(self):
plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
+ self.container.appClosed.get().remove(self.runFinished)
+ self.container.dataAvail.get().remove(self.dataAvail)
self.close()
self.close()
-
+
def runFinished(self, retval):
self.remainingdata = ""
if self.run == 0:
def runFinished(self, retval):
self.remainingdata = ""
if self.run == 0:
diff --git
a/lib/python/Screens/ScanSetup.py
b/lib/python/Screens/ScanSetup.py
index 3e71912b1b4f2453d21a31d32382a4e33fb0ea41..2c63653044c4ff4d91a89b2792856c3af84bd3c8 100644
(file)
--- a/
lib/python/Screens/ScanSetup.py
+++ b/
lib/python/Screens/ScanSetup.py
@@
-156,6
+156,8
@@
class CableTransponderSearchSupport:
def cableTransponderSearchSessionClosed(self, *val):
print "cableTransponderSearchSessionClosed, val", val
def cableTransponderSearchSessionClosed(self, *val):
print "cableTransponderSearchSessionClosed, val", val
+ self.cable_search_container.appClosed.get().remove(self.cableTransponderSearchClosed)
+ self.cable_search_container.dataAvail.get().remove(self.getCableTransponderData)
self.cable_search_container = None
self.cable_search_session = None
if val and len(val) and val[0]:
self.cable_search_container = None
self.cable_search_session = None
if val and len(val) and val[0]: