mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
In -[NSIBObjectData instantiateWithOwner:topLevelObjects:] properly initialize the NSWindowTemplate and fill in the topLevelObjects array.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23106 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b4ed61fce1
commit
7f2a813414
2 changed files with 33 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-06-25 00:26 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/GSNibCompatibility.m: in -[NSIBObjectData
|
||||
instantiateWithOwner:topLevelObjects:] properly initialize
|
||||
the NSWindowTemplate and fill in the topLevelObjects array.
|
||||
|
||||
2006-06-20 20:58 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Headers/Additions/GNUstepGUI/GSNibCompatibility.h: Added
|
||||
|
|
|
@ -956,9 +956,10 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
- (void) nibInstantiateWithOwner: (id)owner topLevelObjects: (NSMutableArray *)topLevelObjects
|
||||
{
|
||||
NSEnumerator *en = [_connections objectEnumerator];
|
||||
NSArray *objs = NSAllMapTableKeys([self names]);
|
||||
id obj = nil;
|
||||
id menu = nil;
|
||||
|
||||
|
||||
// replace the owner with the actual instance provided.
|
||||
[_root setObject: owner];
|
||||
|
||||
|
@ -972,13 +973,37 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
}
|
||||
}
|
||||
|
||||
// instantiate all windows and fill in the top level array.
|
||||
en = [objs objectEnumerator];
|
||||
while((obj = [en nextObject]) != nil)
|
||||
{
|
||||
if([obj isKindOfClass: [NSWindowTemplate class]])
|
||||
{
|
||||
if([obj realObject] == nil)
|
||||
{
|
||||
id o = [self instantiateObject: obj];
|
||||
[topLevelObjects addObject: o];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
id v = NSMapGet(_objects, obj);
|
||||
if(v == nil || v == owner)
|
||||
{
|
||||
[topLevelObjects addObject: obj];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// bring visible windows to front...
|
||||
en = [_visibleWindows objectEnumerator];
|
||||
while((obj = [en nextObject]) != nil)
|
||||
{
|
||||
id w = [self instantiateObject: obj];
|
||||
id w = [obj realObject];
|
||||
[w orderFront: self];
|
||||
}
|
||||
|
||||
// add the menu...
|
||||
menu = [self objectForName: @"MainMenu"];
|
||||
if(menu != nil)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue