Currently it's difficult to modify the 'Get Anki Help' submenu in any way, especially to remove an existing submenu action. This PR makes it possible in the future to easily rename or delete the submenu, or change actions contained in the submenu.
Version info is attached to the submenu action. When modifying the submenu contents, this version can be incremented. Only the latest version of submenu will be shown to the user.
The 'Get Anki Help' submenu is searched using a property id "anking_get_help" to allow renaming in the future.
The submenu can be removed by calling submenu.setVisible(False)
I switched to aqt.utils.openLink instead of webbrowser.open because the latter causes an error on my laptop when there aren't existing instances of the browser.
This started out to make it easier to modify the submenu, but it does feel like I went a bit overboard. What are your thoughts on it?
Currently it's difficult to modify the 'Get Anki Help' submenu in any way, especially to remove an existing submenu action. This PR makes it possible in the future to easily rename or delete the submenu, or change actions contained in the submenu.
"anking_get_help"
to allow renaming in the future.submenu.setVisible(False)
aqt.utils.openLink
instead ofwebbrowser.open
because the latter causes an error on my laptop when there aren't existing instances of the browser.This started out to make it easier to modify the submenu, but it does feel like I went a bit overboard. What are your thoughts on it?