View Single Post
Old 03-09-2011, 08:43 AM   #3
kiwidude
Calibre Plugins 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,730
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
I went ahead and instantiated the action. I needed to get the name attribute as well add to the menus/toolbar anyway which is the same issue.

I have made the behaviour that the dialog only appears if (a) it is a plugin inheriting from InterfaceActionBase, and (b) you have not previously added the plugin to a menu or toolbar. The latter is because I figure users upgrading will not want to get nagged by the dialog.

Edit - just saw chaley's post. The problem is I don't have a handle to the class without instantiating it since it is "unknown"?
Attached Thumbnails
Click image for larger version

Name:	PluginMenuPatch.png
Views:	581
Size:	18.1 KB
ID:	68037  

Last edited by kiwidude; 03-09-2011 at 08:47 AM.
kiwidude is offline   Reply With Quote