Enhance NIB loading compatibility.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18292 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2003-12-30 17:52:16 +00:00
parent 8167ce1caf
commit 32978cf148
2 changed files with 11 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2003-12-30 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSBundleAdditions.m (-pathForNibResource:) ignore
extension "nib", so "gorm" or "gmodel" get used instead.
2003-12-30 Fred Kiefer <FredKiefer@gmx.de> 2003-12-30 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSAffineTransform.h: Corrected element names tX * Headers/AppKit/NSAffineTransform.h: Corrected element names tX

View file

@ -418,6 +418,10 @@ Class gmodel_class(void)
ext = [fileName pathExtension]; ext = [fileName pathExtension];
fileName = [fileName stringByDeletingPathExtension]; fileName = [fileName stringByDeletingPathExtension];
if ([ext isEqualToString: @"nib"] == YES)
{
ext = @"";
}
/* /*
* Build an array of resource paths that differs from the normal order - * Build an array of resource paths that differs from the normal order -
@ -457,14 +461,10 @@ Class gmodel_class(void)
path = [rootPath stringByAppendingPathExtension: @"gorm"]; path = [rootPath stringByAppendingPathExtension: @"gorm"];
if ([mgr isReadableFileAtPath: path] == NO) if ([mgr isReadableFileAtPath: path] == NO)
{ {
path = [rootPath stringByAppendingPathExtension: @"nib"]; path = [rootPath stringByAppendingPathExtension: @"gmodel"];
if ([mgr isReadableFileAtPath: path] == NO) if ([mgr isReadableFileAtPath: path] == NO)
{ {
path = [rootPath stringByAppendingPathExtension: @"gmodel"]; continue;
if ([mgr isReadableFileAtPath: path] == NO)
{
continue;
}
} }
} }
return path; return path;