disable the qaction of the plugin, that should make qt render it as disabled. But in general in calibre actions are not rendered disabled, as it is not always clear to the user why it is disabled. Instead popup an error message explaining that the action can only be used in the main book list not the device list. And add metadata to the plugin to indicate it should not be added to the device toolbars (see dont_add_to) in the plugin api.
|