View Single Post
Old 11-19-2012, 05:58 PM   #3
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
Posts: 1,719
Karma: 509671
Join Date: Dec 2011
Location: Midwest USA
Device: Nook STR w/Glowlight, Kindle 3g, Droid
Disabling self.menuless_qaction too does fix the problem. I've changed my code to:

Code:
    # disable when not in library. (main,carda,cardb)
    def location_selected(self, loc):
        enabled = loc == 'library'
        self.qaction.setEnabled(enabled)
        self.menuless_qaction.setEnabled(enabled)
Thanks for pointing it out.

Does that suggest that some of calibre's built in actions need that change, too?

I see the same issue--disabled button, but keyboard shortcut works with on last selected library book with ConvertAction, SendToDeviceAction and EditMetadataAction.

And a quick grep finds 12 places gui2/actions/*.py using 'self.qaction.setEnabled(enabled)'.
JimmXinu is offline   Reply With Quote