mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 00:20:49 +00:00
Many updates to fix problems with menus etc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3500 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cb22210be6
commit
25a37ec353
7 changed files with 70 additions and 56 deletions
|
@ -72,17 +72,19 @@ static BOOL usesUserKeyEquivalents = YES;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id)copyWithZone:(NSZone*)zone
|
||||
- (id) copyWithZone: (NSZone*)zone
|
||||
{
|
||||
NSMenuItem* copy = [super copyWithZone:zone];
|
||||
|
||||
NSDebugLog (@"menu item '%@' copy", [self title]);
|
||||
copy->representedObject = [representedObject retain];
|
||||
copy->hasSubmenu = hasSubmenu;
|
||||
if (hasSubmenu) { // recursive call
|
||||
id submenu = [target copyWithZone:zone]; // to create our
|
||||
copy->target = [submenu retain]; // submenus
|
||||
}
|
||||
if (hasSubmenu)
|
||||
{
|
||||
// recursive call
|
||||
id submenu = [target copyWithZone: zone];
|
||||
copy->target = submenu;
|
||||
}
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue