Removed NSBundle extension methods.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8085 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2000-11-12 16:43:37 +00:00
parent 58f33eaca3
commit c153969272
2 changed files with 2 additions and 38 deletions

View file

@ -32,13 +32,6 @@
- (void)awakeFromModel;
@end
@interface NSBundle (IMLoading)
+ (BOOL)loadGModelNamed:(NSString *)gmodelName owner:(id)owner;
- (BOOL)loadIMFile:(NSString*)filename owner:(id)owner;
@end
@interface GMModel : NSObject
{
NSArray* objects;

View file

@ -37,36 +37,6 @@ void __dummy_IMLoading_functionForLinking()
__dummy_IMLoading_functionForLinking();
}
@implementation NSBundle (IMLoading)
- (BOOL)loadIMFile:(NSString*)path owner:(id)owner
{
return [GMModel loadIMFile:path owner:owner bundle:self];
}
+ (BOOL)loadGModelNamed:(NSString *)gmodelName owner:(id)owner
{
NSBundle *bundle;
NSString *path;
/* Pull off the .gmodel extension (if any) for pathForResource:ofType: */
if ([[gmodelName pathExtension] isEqualToString:@"gmodel"])
gmodelName = [gmodelName stringByDeletingPathExtension];
/* Use owner's bundle (if any) just like +loadNibNamed:owner: does. */
bundle = [NSBundle bundleForClass: [owner class]];
if (bundle == nil)
bundle = [NSBundle mainBundle];
path = [bundle pathForResource:gmodelName ofType:@"gmodel"];
return [GMModel loadIMFile:path owner:owner bundle:bundle];
}
@end /* NSBundle(IMLoading) */
@implementation GMModel
id _nibOwner = nil;
@ -110,7 +80,8 @@ BOOL _fileOwnerDecoded = NO;
NSString *root;
root = [NSString stringWithCString:getenv("GNUSTEP_SYSTEM_ROOT")];
root = [root stringByAppendingPathComponent:@"Library/Model/"];
root = [root stringByAppendingPathComponent:@"Library"];
root = [root stringByAppendingPathComponent:@"Model"];
abspath = [root stringByAppendingPathComponent:path];
if (![[NSFileManager defaultManager] fileExistsAtPath:abspath])
return NO;