mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
* 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:
parent
4991a29743
commit
039f0c39b0
2 changed files with 26 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue