summaryrefslogtreecommitdiff
path: root/src/plugin_manager.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-11-13 18:39:07 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-11-13 18:39:07 +0100
commit3ea5eb6163181ba016cfddcc616a171d7f309e76 (patch)
tree696fef8697181b96616d7953195c4324d1834cfa /src/plugin_manager.py
parent35335ccb5b0ef743228ac25bffcc16ffc090ad55 (diff)
parentc4f7d9b98a229ad52e834313ab93f0f9ebc77884 (diff)
downloadpoezio-3ea5eb6163181ba016cfddcc616a171d7f309e76.tar.gz
poezio-3ea5eb6163181ba016cfddcc616a171d7f309e76.tar.bz2
poezio-3ea5eb6163181ba016cfddcc616a171d7f309e76.tar.xz
poezio-3ea5eb6163181ba016cfddcc616a171d7f309e76.zip
Merge branch 'master' of http://git.louiz.org/poezio
Diffstat (limited to 'src/plugin_manager.py')
-rw-r--r--src/plugin_manager.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugin_manager.py b/src/plugin_manager.py
index fe4d2b7e..437d8ee2 100644
--- a/src/plugin_manager.py
+++ b/src/plugin_manager.py
@@ -99,12 +99,15 @@ class PluginManager(object):
def add_tab_command(self, module_name, tab_type, name, handler, help, completion=None):
commands = self.tab_commands[module_name]
t = tab_type.__name__
+ if name in tab_type.plugin_commands:
+ return
if not t in commands:
commands[t] = []
commands[t].append((name, handler, help, completion))
+ tab_type.plugin_commands[name] = (handler, help, completion)
for tab in self.core.tabs:
if isinstance(tab, tab_type):
- tab.add_plugin_command(name, handler, help, completion)
+ tab.update_commands()
def del_tab_command(self, module_name, tab_type, name):
commands = self.tab_commands[module_name]