* Source/NSWorkspace.m: Improve handling of CFBundleType...

constants in the private method _extIconForApp:info:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28297 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2009-05-24 02:17:05 +00:00
parent 4991a29743
commit 039f0c39b0
2 changed files with 26 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2009-05-23 22:17-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSWorkspace.m: Improve handling of CFBundleType...
constants in the private method _extIconForApp:info:.
2009-05-23 11:48-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/GSStandardWindowDecorationView.m: Live window resize changes

View file

@ -2136,10 +2136,29 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
{
NSDictionary *typeInfo = [extInfo objectForKey: appName];
NSString *file = [typeInfo objectForKey: @"NSIcon"];
//
// If the NSIcon entry isn't there and the CFBundle entries are,
// get the first icon in the list if it's an array, or assign
// the icon to file if it's a string.
//
// FIXME: CFBundleTypeExtensions/IconFile can be arrays which assign
// multiple types to icons. This needs to be handled eventually.
//
if(file == nil)
{
file = [typeInfo objectForKey: @"CFBundleTypeIconFile"];
id icon = [typeInfo objectForKey: @"CFBundleTypeIconFile"];
if([icon isKindOfClass: [NSArray class]])
{
if([icon count])
{
file = [icon objectAtIndex: 0];
}
}
else
{
file = icon;
}
}
if (file && [file length] != 0)