Skip to content
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): add app name to native Quit and Hide items, closes #536 #570

Merged
merged 7 commits into from
Sep 25, 2022

Conversation

caesar
Copy link
Contributor

@caesar caesar commented Sep 25, 2022

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

Implemented by getting the name of the current app from NSRunningApplication and adding it to the menu items labels.

closes #536

@caesar caesar requested a review from a team as a code owner September 25, 2022 00:35
@caesar
Copy link
Contributor Author

caesar commented Sep 25, 2022

Sorry, forgot cargo fmt again… fixed now

src/platform_impl/macos/menu.rs Outdated Show resolved Hide resolved
src/platform_impl/macos/menu.rs Outdated Show resolved Hide resolved
@caesar
Copy link
Contributor Author

caesar commented Sep 25, 2022

This feels to me like a much cleaner implementation now, thanks for the pointers @amrbashir.

Could you just confirm that you're happy with these changes to the app_name function?

@FabianLars
Copy link
Member

I think that the Option should be reintroduced. You can't really expect that CFBundleName is set in all scenarios

src/platform_impl/macos/util/mod.rs Outdated Show resolved Hide resolved
src/platform_impl/macos/menu.rs Outdated Show resolved Hide resolved
.changes/macos-menus-appname.md Outdated Show resolved Hide resolved
.changes/macos-menus-appname.md Outdated Show resolved Hide resolved
src/platform_impl/macos/util/mod.rs Show resolved Hide resolved
src/platform_impl/macos/menu.rs Outdated Show resolved Hide resolved
@caesar
Copy link
Contributor Author

caesar commented Sep 25, 2022

Thanks for all the reviews @amrbashir 🙂

Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quit and Hide native menu items should include app name
3 participants