When getting the name for a human readable document type name, use also

CFBundleTypeName.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27684 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rmottola 2009-01-25 13:05:47 +00:00
parent 771bce4672
commit c47c417df7
2 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2009-01-25 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSDocumentController.m (-_nameForHumanReadableType:): Also
look at CFBundleTypeName.
2009-01-25 06:47-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSMenuView.m: Refactor code which executes the action

View file

@ -1377,9 +1377,16 @@ static BOOL _shouldClose = YES;
return [self _editorTypesForClass: documentClass];
}
- (NSString *) _nameForHumanReadableType: (NSString *)type
- (NSString *) _nameForHumanReadableType: (NSString *)typeHR
{
return [HR_TYPE_INFO(type) objectForKey: NSNameKey];
NSDictionary *typeInfo = HR_TYPE_INFO(typeHR);
NSString *type = [typeInfo objectForKey: NSNameKey];
if(type == nil)
{
type = [typeInfo objectForKey: CFBundleTypeName];
}
return type;
}
- (NSArray *) _displayNamesForTypes: (NSArray *)types