View Single Post
Old 12-20-2019, 05:04 PM   #5
olerite
Junior Member
olerite began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Apr 2017
Device: Kobo Glo
Quick question on adding icons to the menubar

Quote:
Originally Posted by kovidgoyal View Post
You would create a GUI plugin, when the user clicks on it it would need to call

self.gui.device_manager.mount_device(kls=IBooksDri ver)

where IbooksDriver is a class that implements the driver. The interface such a class must implement is in devices/interface.py simply inherit from that class and implement the various methods.
I am taking a look at the Fusion Books as an exemple, and it seems that they made it even simpler, without actually inherit from the interface.py class.

Anyway, I do still have some doubt on the GUI integration. Is if there is a way to automatically add the plugin icon to the menubar or its context menu option?

The ones I created using action_spec and create_action() are available to be added if I go to the customization preferences pane, but I am wondering if they can be added by any method of the GUI object, sparing the user of this effort.
olerite is offline   Reply With Quote