View Single Post
Old 11-10-2010, 03:25 PM   #2
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Ok, so I got one step further... I changed the code line for actual_plugin to have this value:
Code:
actual_plugin = 'calibre.gui2.actions.foo_plugin:FooAction'
This got my plugin to appear on the preferences dialog. However my context menu action doesn't appear. So I restarted Calibre (in case the menus are built at startup)... no luck and also the plugin is no longer listed in the Preferences dialog until I manually add it again.

If I list the plugins using calibre-customize it appears in the list, and I can see the zip file in the Roaming\calibre\plugins folder.

There seems to be some trick I am missing though to (a) get the plugin to appear back in the Preferences dialog after a restart, and (b) to get my menu items to actually appear (which may or may not be related to the implementation).

I have tried copying directly an implementation from show_book_details.py into my FooAction class to prove it is not part of the code and it makes no difference? That version is now attached.

Apologies for being a pain for asking.
Attached Files
File Type: txt foo_plugin.py.txt (1.6 KB, 74 views)

Last edited by kiwidude; 11-10-2010 at 03:54 PM. Reason: Added attachment
kiwidude is offline   Reply With Quote