mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 17:20:38 +00:00
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:
parent
9dbc5d9726
commit
8741007ed8
1 changed files with 0 additions and 50 deletions
|
@ -178,31 +178,6 @@ static const int currentVersion = 1;
|
||||||
|
|
||||||
@implementation NSBundle (NSBundleAdditions)
|
@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
|
static
|
||||||
Class gmodel_class(void)
|
Class gmodel_class(void)
|
||||||
{
|
{
|
||||||
|
@ -418,31 +393,6 @@ Class gmodel_class(void)
|
||||||
return nil;
|
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
|
- (BOOL) loadNibFile: (NSString*)fileName
|
||||||
externalNameTable: (NSDictionary*)context
|
externalNameTable: (NSDictionary*)context
|
||||||
withZone: (NSZone*)zone
|
withZone: (NSZone*)zone
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue