wxGo icon indicating copy to clipboard operation
wxGo copied to clipboard

MacOS: Customizing the label of the quit application menu item

Open philiplb opened this issue 7 years ago • 3 comments
trafficstars

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

philiplb avatar Apr 01 '18 13:04 philiplb

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

dontpanic92 avatar Apr 01 '18 15:04 dontpanic92

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"

philiplb avatar Apr 01 '18 18:04 philiplb

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

Asday avatar Aug 17 '18 20:08 Asday