Fixed -appIconForApp: in NSWorkspace

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20256 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Quentin Mathe 2004-10-24 17:24:38 +00:00
parent 38ca67f7e9
commit 7a7ef628ca
2 changed files with 8 additions and 5 deletions

View file

@ -1,3 +1,9 @@
2004-10-24 Quentin Mathe <qmathe@club-internet.fr>
* Source/NSWorkspace.m (-appIconForApp:): Fixed code to be more
generic by using -[NSBundle pathForImageResource:]. Now the method works
with NSIcon value not path based like "MyApplication.tiff".
2004-10-22 08:26 Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSStepperCell.m: Corrected issue with [NSStepperCell

View file

@ -1488,12 +1488,9 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
{
return nil;
}
iconPath = [[bundle infoDictionary] objectForKey: @"NSIcon"];
if (![iconPath isAbsolutePath])
{
iconPath = [[bundle bundlePath] stringByAppendingPathComponent: iconPath];
}
iconPath = [bundle pathForImageResource: iconPath];
return [self _saveImageFor: iconPath];
}