View Single Post
Old 11-19-2012, 01:05 PM   #1
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.
 
JimmXinu's Avatar
 
Posts: 6,312
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Disabled Actions still called by Keyboard Shortcut?

I borrowed some code from SendToDeviceAction to disable my plugins while on device view:
Code:
    def location_selected(self, loc):
        enabled = loc == 'library'
        self.qaction.setEnabled(enabled)
But in both my plugin and SendToDeviceAction, the Keyboard Shortcut key still triggered it.

IE, I can select a book in the library, switch to the device view--'Send to Device' on my toolbar is now disabled--and hit 'D' and calibre will send the book from the library to the device.

Is it supposed to work that way? I would expect disabled actions to not work from Keyboard Shortcut either.
JimmXinu is offline   Reply With Quote