summaryrefslogtreecommitdiffstats
path: root/module/AddonManager.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-05-17 20:06:11 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-05-17 20:06:11 +0200
commit2a74f88fcaf3d3baac24397de81a967c0b8c73e2 (patch)
treec80495e505432637cf69053967ea87090d69baa5 /module/AddonManager.py
parentsome multiuser db changes (diff)
downloadpyload-2a74f88fcaf3d3baac24397de81a967c0b8c73e2.tar.xz
small typo fixes and TODOs
Diffstat (limited to 'module/AddonManager.py')
-rw-r--r--module/AddonManager.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/module/AddonManager.py b/module/AddonManager.py
index cec650c92..ef5c52149 100644
--- a/module/AddonManager.py
+++ b/module/AddonManager.py
@@ -35,12 +35,12 @@ class AddonManager:
self.core = core
self.config = self.core.config
- __builtin__.addonManager = self #needed to let addons register themself
+ __builtin__.addonManager = self #needed to let addons register themselves
self.log = self.core.log
self.plugins = {}
self.methods = {} # dict of names and list of methods usable by rpc
- self.events = {} # Contains event that will be registred
+ self.events = {} # Contains event that will be registered
self.lock = RLock()
self.createIndex()
@@ -147,7 +147,7 @@ class AddonManager:
# active the addon in new thread
start_new_thread(plugin.activate, tuple())
- self.registerEvents()
+ self.registerEvents() # TODO: BUG: events will be destroyed and not re-registered
@lock
def deactivateAddon(self, plugin):
@@ -230,11 +230,15 @@ class AddonManager:
return info
def addEventListener(self, plugin, func, event):
+ """ add the event to the list """
+
+
if plugin not in self.events:
self.events[plugin] = []
self.events[plugin].append((func, event))
def registerEvents(self):
+ """ actually register all saved events """
for name, plugin in self.plugins.iteritems():
if name in self.events:
for func, event in self.events[name]: