From 4b02b1a8123505607de90db7a82b485d302f0267 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 13 Nov 2011 00:25:30 +0100 Subject: Fix add_tab_command (and remove) --- src/plugin_manager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/plugin_manager.py') 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] -- cgit v1.2.3