mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:50:48 +00:00
Fix removal of quit item from info menu
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29077 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1181b02b98
commit
5208c44f6e
1 changed files with 21 additions and 23 deletions
|
@ -150,6 +150,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
if (_menu.horizontal == NO)
|
||||
{
|
||||
NSMenuItem *appItem;
|
||||
NSMenu *sub;
|
||||
SEL sel = @selector(terminate:);
|
||||
|
||||
/* The title of the main menu should be the process name.
|
||||
|
@ -173,21 +174,18 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
[self addItem: quitItem];
|
||||
}
|
||||
|
||||
/* An OSX main menu has the first item named with the process name
|
||||
* and this item points to a submenu whose contents are much the
|
||||
* same as a GNUstep info menu.
|
||||
/* An OSX main menu has the first item pointing to a submenu
|
||||
* whose contents are much the same as a GNUstep info menu.
|
||||
*/
|
||||
appItem = (NSMenuItem*)[self itemAtIndex: 0]; // Info item.
|
||||
if (YES == [[appItem title] isEqualToString: processName]
|
||||
&& [appItem submenu] != nil)
|
||||
sub = [appItem submenu];
|
||||
if (sub != nil)
|
||||
{
|
||||
NSString *infoString;
|
||||
NSMenu *sub;
|
||||
NSInteger index;
|
||||
|
||||
infoString = NSLocalizedString (@"Info", @"Info");
|
||||
[appItem setTitle: infoString];
|
||||
sub = [appItem submenu];
|
||||
[sub setTitle: infoString];
|
||||
/* The submenu may contain a 'quit' item ... if so we need to
|
||||
* remove it as we already added one to the main menu.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue