Quote:
Originally Posted by kovidgoyal
look at the patch accompanying the commit. Specifically the patch to plugins.rst and __init__.py
Basically you just have to create the InterfaceActionBase and InterfaceAction subclasses and have the load_actual_plugin method of your InterfaceActionBase subclass return the InterfaceAction subclass
|
Kovid, do you have an example py you could post, just like the HelloWorld one?
I'm going through trial and error here and going in circles a bit. It was blowing up on my imports being defined at the top (giving errors like "ImportError: cannot import name error_dialog"). So I moved those into my InterfaceAction subclass and now get this error:
Code:
Failed to initialize plugin...
Traceback (most recent call last):
File "D:\CalibreDev\latest\calibre\src\calibre\customize\ui.py", line 518, in initialize_plugins
File "D:\CalibreDev\latest\calibre\src\calibre\customize\ui.py", line 83, in load_plugin
File "<string>", line 8, in <module>
File "D:\CalibreDev\latest\calibre\src\calibre\gui2\actions\__init__.py", line 12, in <module>
ImportError: cannot import name Dispatcher