Re: [Gtk-osx-users] How to handle the standard menuitem 'quit'?

Am 20.09.2010 17:07, schrieb John Ralls:

>> How can I change the *labeltext* 'quit', e.g. to a 'quit my_app' or a
>> translation?
> a: Quit is handled directly by OSX, so you have to do it their way. The signals that gtkosxapplication provides make the OSX notification and response available to Gtk+ code. If you'd rather, you can write your own cocoa application delegate and register it -- but you'd better know what you're doing.
> b: The "Quit" menu label is at present hard-coded. The easy way to change it is to just edit that string in ige-mac-integration/src/gtkosxapplication_quartz.c at line 208 and the corresponding translations in the message files in ige-mac-integration/strings. It would be better, I suppose, to get the application name from the bundle and insert it, as OSX does with the built-in menu. Perhaps I'll add that at some point when time permits.

What about replacing the NSString by a NSLocalizedString in the 
following line? Then the application could look into the language 
folder, e.g. /de.lproj, in /Resources for a translation resource like 

menuitem = [[NSMenuItem alloc] initWithTitle:@"Quit"
	action:@selector(terminate:) keyEquivalent:@"q"];


menuitem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Quit", nil)
	action:@selector(terminate:) keyEquivalent:@"q"];

and so for the other menuitems ...



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]