Status report on provider-based menus
This is a status report on porting all menus and plugin menu items to providers.
I've had to make a few changes to xlgui.widgets.
Also, I wrote functions for adding MenuItems and CheckMenuItems to the Tools menu directly. There are two reasons for this decision:
- Appending an item to the tools menu is not possible without setting the "after" parameter correctly. Instead of asking plugin developers to find the name of the last item, I setup a plugins-separator, and my functions always insert items after this separator (so they're not exactly appended but at least they don't get in the way of the default menu items). I still need to make it possible to hide the separator based on the presence of items after it, but I don't know how to do that yet.
- It is more than time to write an API for inserting menu items in the tools menu, as there are currently a lot of plugins to port, and I wouldn't want any future changes to the internal menu items API to mean that all of these plugins are to be ported again. Ideally, there should be some xl.plugin_utils.py and xlgui.plugin_
Currently, only the shutdown and ipconsole plugins are ported, so this is still work in progress. I'm posting a diff only for developers to be able to point to any potential (and likely) mistakes, but please do not commit it yet.
|Changed in exaile:|
|milestone:||3.3.1 → 3.4.0|