-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
fix(menus): macOS Services menu not working, closes #243 #569
Conversation
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.
missing changefile
Wait, there are changefiles now? Nice! |
thank you |
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.
Is this divider redundant?
It is indeed redundant. When I implemented this I wasn't sure how to solve it, but I have since found the solution, which is simply to change NSMenu::alloc(nil)
to NSMenu::new(nil)
as shown in the code review below.
@@ -308,10 +308,12 @@ impl Menu { | |||
)), | |||
MenuItem::Services => unsafe { | |||
let item = make_menu_item("Services", None, None, MenuType::MenuBar); | |||
// we have to assign an empty menu as the app's services menu, and macOS will populate it | |||
let services_menu = NSMenu::alloc(nil).autorelease(); |
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.
let services_menu = NSMenu::alloc(nil).autorelease(); | |
let services_menu = NSMenu::new(nil).autorelease(); |
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.
when will this be fixed?
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information
closes #243