dontpanic92 / wxGo

Golang wxWidgets Wrapper
Other
403 stars 51 forks source link

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

Open philiplb opened 6 years ago

philiplb commented 6 years ago

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 commented 6 years ago

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

philiplb commented 6 years ago

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:

Asday commented 6 years ago

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".