-
-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve support for overriding default menu items #2636
Conversation
4c95e58
to
60c27fb
Compare
dummy/src/toga_dummy/app.py
Outdated
@@ -22,8 +26,43 @@ def __init__(self, interface): | |||
|
|||
def create(self): | |||
self._action("create App") | |||
self.create_app_commands() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah - this was the part I mentioned yesterday about PRs starting to step on each other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I've removed the redundant line.
Derived from #2244.
Some features related to the default menu items:
preferences()
method. If the user overrides this method, it will be used as the implementation of the Preferences menu item; if undefined, the menu item will still exist, but will be disabled. This isn't a full implementation of Settings API for Toga #90, but it does provide the ability for users to hook into the menu item.When combined with #2619, an app is able to delete or modify all the default menu items by a clear reference. The only exception to this are the ones on the Cocoa backend that are "window system related" (e.g., Hide, Close Window, Cut and Paste) which are included to provide basic window management, and shouldn't require any user override.
Refs #90.
PR Checklist: