Apply 'name' argument in plugin.playlist.FilterCommand
[hooke.git] / hooke / plugin / multifit.py
index 986b7813a26e23de57cef0baec2004ded9f39647..56befcaeef7f8c9d6d757993029da4f77e14e617 100644 (file)
@@ -31,9 +31,8 @@ from ..plugin.playlist import PlaylistArgument
 class MultifitPlugin (Plugin):
     def __init__(self):
         super(MultifitPlugin, self).__init__(name='multifit')
+        self._commands = [MultifitCommand(self)]
 
-    def commands(self):
-        return [MultifitCommand()]
 
 class MultifitCommand (Command):
     """Presents curves for interactive manual analysis.
@@ -46,7 +45,7 @@ class MultifitCommand (Command):
     """
     #NOTE: centerzero plot modifier should be activated (set centerzero
     #1).
-    def __init__(self):
+    def __init__(self, plugin):
         super(MultifitCommand, self).__init__(
             name='multifit',
             arguments=[
@@ -86,7 +85,7 @@ data between them.
 Perform the fits on the current curve instead of iterating.
 """.strip()),
                 ],
-            help=self.__doc__)
+            help=self.__doc__, plugin=plugin)
 
     def _run(self, hooke, inqueue, outqueue, params):
         counter=0