mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
More minor cleanup.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18601 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b6189fe8d4
commit
91430f347e
1 changed files with 34 additions and 32 deletions
|
@ -56,6 +56,7 @@
|
|||
|
||||
@implementation NSNib
|
||||
|
||||
// Private methods...
|
||||
+ (NSString *) _nibFilename: (NSString *)fileName
|
||||
{
|
||||
NSFileManager *mgr = [NSFileManager defaultManager];
|
||||
|
@ -129,6 +130,39 @@
|
|||
object: nil];
|
||||
}
|
||||
|
||||
- (NSDictionary *) _copyTable: (NSDictionary *)dict
|
||||
{
|
||||
NSMutableDictionary *ctx = nil;
|
||||
|
||||
if(dict != nil)
|
||||
{
|
||||
id obj = nil;
|
||||
|
||||
// copy the dictionary...
|
||||
ctx = [NSMutableDictionary dictionaryWithDictionary: dict];
|
||||
|
||||
// remove and set the owner...
|
||||
obj = [ctx objectForKey: @"NSNibOwner"];
|
||||
if(obj != nil)
|
||||
{
|
||||
[ctx removeObjectForKey: @"NSNibOwner"];
|
||||
[ctx setObject: obj forKey: @"NSOwner"];
|
||||
}
|
||||
|
||||
// Remove and set the top level objects...
|
||||
obj = [ctx objectForKey: @"NSNibTopLevelObjects"];
|
||||
if(obj != nil)
|
||||
{
|
||||
[ctx removeObjectForKey: @"NSNibTopLevelObjects"];
|
||||
[ctx setObject: obj forKey: @"NSTopLevelObjects"];
|
||||
}
|
||||
}
|
||||
|
||||
return ctx;
|
||||
}
|
||||
|
||||
// Public methods...
|
||||
|
||||
/**
|
||||
* Load the NSNib object from the specified URL. This location can be
|
||||
* any type of resource capable of being pointed to by the NSURL object.
|
||||
|
@ -173,38 +207,6 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (NSDictionary *) _copyTable: (NSDictionary *)dict
|
||||
{
|
||||
NSMutableDictionary *ctx = nil;
|
||||
|
||||
if(dict != nil)
|
||||
{
|
||||
id obj = nil;
|
||||
|
||||
// copy the dictionary...
|
||||
ctx = [NSMutableDictionary dictionaryWithDictionary: dict];
|
||||
|
||||
// remove and set the owner...
|
||||
obj = [ctx objectForKey: @"NSNibOwner"];
|
||||
if(obj != nil)
|
||||
{
|
||||
[ctx removeObjectForKey: @"NSNibOwner"];
|
||||
[ctx setObject: obj forKey: @"NSOwner"];
|
||||
}
|
||||
|
||||
// Remove and set the top level objects...
|
||||
obj = [ctx objectForKey: @"NSNibTopLevelObjects"];
|
||||
if(obj != nil)
|
||||
{
|
||||
[ctx removeObjectForKey: @"NSNibTopLevelObjects"];
|
||||
[ctx setObject: obj forKey: @"NSTopLevelObjects"];
|
||||
}
|
||||
}
|
||||
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is a GNUstep specific method. This method is used when the caller wants the
|
||||
* objects instantiated in the nib to be stored in the given <code>zone</code>.
|
||||
|
|
Loading…
Reference in a new issue