Moved add-on methods.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14558 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2002-09-25 22:55:19 +00:00
parent 9dbc5d9726
commit 8741007ed8

View file

@ -178,31 +178,6 @@ static const int currentVersion = 1;
@implementation NSBundle (NSBundleAdditions)
- (NSString*) pathForImageResource: (NSString*)name
{
NSString *ext = [name pathExtension];
NSString *path = nil;
if ((ext == nil) || [ext isEqualToString:@""])
{
NSArray *types = [NSImage imageUnfilteredFileTypes];
unsigned c = [types count];
unsigned i;
for (i = 0; path == nil && i < c; i++)
{
ext = [types objectAtIndex: i];
path = [self pathForResource: name ofType: ext];
}
}
else
{
name = [name stringByDeletingPathExtension];
path = [self pathForResource: name ofType: ext];
}
return path;
}
static
Class gmodel_class(void)
{
@ -418,31 +393,6 @@ Class gmodel_class(void)
return nil;
}
- (NSString *)pathForSoundResource:(NSString *)name
{
NSString *ext = [name pathExtension];
NSString *path = nil;
if ((ext == nil) || [ext isEqualToString:@""])
{
NSArray *types = [NSSound soundUnfilteredFileTypes];
unsigned c = [types count];
unsigned i;
for (i = 0; path == nil && i < c; i++)
{
ext = [types objectAtIndex: i];
path = [self pathForResource: name ofType: ext];
}
}
else
{
name = [name stringByDeletingPathExtension];
path = [self pathForResource: name ofType: ext];
}
return path;
}
- (BOOL) loadNibFile: (NSString*)fileName
externalNameTable: (NSDictionary*)context
withZone: (NSZone*)zone