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

MacOS: Customizing the label of the quit application menu item #54

Open
philiplb opened this issue Apr 1, 2018 · 3 comments
Open

MacOS: Customizing the label of the quit application menu item #54

philiplb opened this issue Apr 1, 2018 · 3 comments

Comments

@philiplb
Copy link

philiplb commented Apr 1, 2018

Hi,
on MacOS, there is this application menu, here labeled "Hello_World" containing the quit application menu item labeled "Quit Wxgo":
screen shot 2018-04-01 at 15 15 28
How can I programmatically change the label of "Hello_World"?
How can I change this quit application menu item label to "Quit <MyApplicationName>"?
And "Hide Wxgo"?

@dontpanic92
Copy link
Owner

Have you tried to pass the name when calling wx.NewApp? For example, wx.NewApp("HelloWorld")

@philiplb
Copy link
Author

philiplb commented Apr 1, 2018

Hi,
thank you for the response. I just tried it and that works half way:
It doesn't change the "Hello_World" label but it changes the menu entries. But it modifies them:

wx.NewApp("FooBar 42")

Results in "Foobar 42". Note the lowercase "b".

Environment:

  • MacOS 10.13.3
  • Go 1.10.1
  • wxGo from my Gopkg.lock:
[[projects]]
  name = "github.com/dontpanic92/wxGo"
  packages = ["wx"]
  revision = "8da0a0ebd793d0383a41a0728e43dd35afe81bf7"
  version = "v0.3"

@Asday
Copy link

Asday commented Aug 17, 2018

It looks like .NewApp() is the only place the string "wxgo" is used within the library...

Do the "Hide" and "Quit" options show the correct name if you compile and bundle your app?

The snarfing of capitalisation seems like something macOS is doing for some stupid design over functionality reason. Notice it's also title-capped "Wxgo".

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

No branches or pull requests

3 participants