PDA

View Full Version : Changing the name of the application menu on OSX



bishop123b
21st December 2008, 21:03
Hi,

how do I change the name of the menu next to the apple logo? Qt automatically sets it to the name of the binary 'foobar', but I want 'FooBar'.

I know I can create bundles with a info.plist file and specify it there, but I'm not using qmake (scons instead).

There must be an OSX specific function call to set this name?

-- wang

bishop123b
23rd December 2008, 17:42
bump xxxxxxxxxxxxxxxxxx

chaoticbob
24th December 2008, 03:57
My understanding of this (albeit maybe dated) is that you can't actually change this. I remember hearing someone complain that there's no access to this either through the Cocoa or the Carbon API. It defaults to the name of the application. It's been 2 or 3 years since I've touched Carbon...so there might be now.

But I googled around and found this:
http://lapcatsoftware.com/blog/2007/05/

"...... In MainMenu.nib of a default Xcode Cocoa application project, the application menu is the submenu for the item NewApplication. Actually, it doesn’t matter what the title is of this menu item, because regardless of how you set it in Interface Builder, Cocoa replaces the title at runtime with an empty string, and the name of the application boldly goes on the menu bar. The title of the application menu itself is "Apple", which is highly misleading, considering that its left-side neighbor on the menu bar has an Apple icon at the top. Just to be clear, the "Apple" menu is not the menu with an Apple. Got it?"

Hope it helps.

kemp
26th December 2008, 07:40
Hi!

Why don't you leave the "foobar" binary alone and create instead a symbolic link to this binary.

"ln -s foobar FooBar"

then run FooBar and the name should be properly displayed.

chaoticbob
27th December 2008, 02:48
..also you could edit project file so the resulting binary to container FooBar.... ;)