Esempio n. 1
0
 def register_action(action):
     """Registers action."""
     if isinstance(action, type) and issubclass(action, Action):
         action = action(name=name, filter=filter, unshade=unshade)
     elif callable(action):
         action = SimpleActionWrapper(action, name.lower(), filter, unshade)
     manager.register(action)
     return action
Esempio n. 2
0
 def register_action(action):
     """Registers action."""
     if isinstance(action, type) and issubclass(action, Action):
         action = action(name=name, filter=filter, unshade=unshade)
     elif callable(action):
         action = SimpleActionWrapper(action, name.lower(), filter, unshade)
     manager.register(action)
     return action
Esempio n. 3
0
 def register(self):
     """Register instance of Action as PyWO action."""
     manager.register(self)
Esempio n. 4
0
 def register(self):
     """Register instance of `Action` as PyWO action."""
     manager.register(self)