iTolerat 'Authors' in the plist being a string

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34116 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2011-11-04 06:16:37 +00:00
parent ccbfc5c0c0
commit be8c8f6657
2 changed files with 24 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2011-11-04 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSInfoPanel.m: Tolerate 'Authors' being a string containing
a single author as well as an array.
2011-11-03 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTabView.m: Add some bindings for NSTabView.

View file

@ -348,10 +348,25 @@ new_label (NSString *value)
if (nil_or_not_of_class (authors, [NSArray class]))
{
authors = value_from_info_plist_for_key (@"Authors");
// if (nil_or_not_of_class (authors, [NSArray class]))
// authors = [NSArray arrayWithObject: @"Unknown"];
if ([authors isKindOfClass: [NSString class]])
{
authors = [NSArray arrayWithObject: authors];
}
else
{
authors = value_from_info_plist_for_key (@"Authors");
if (nil_or_not_of_class (authors, [NSArray class]))
{
if ([authors isKindOfClass: [NSString class]])
{
authors = [NSArray arrayWithObject: authors];
}
else
{
authors = [NSArray arrayWithObject: @"Unknown"];
}
}
}
}
/* URL */
if (dictionary)