Fix (again) the modifier mask processing for XIB5

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40464 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2017-04-10 16:50:27 +00:00
parent 05060dd539
commit 860d089686

View file

@ -1323,13 +1323,20 @@ didStartElement: (NSString*)elementName
id object = nil;
NSDictionary *attributes = [[element elementForKey: @"keyEquivalentModifierMask"] attributes];
if ((attributes == nil) || ([attributes count] == 0))
if (attributes == nil)
{
// Seems that Apple decided to omit this attribute IF Control key alone
// is applied. If this key is present WITH NO setting then that NULL
// value is used for the modifier mask...
object = [NSNumber numberWithUnsignedInteger: 0];
object = [NSNumber numberWithUnsignedInteger: NSCommandKeyMask];
}
else if ([attributes count] == 1)
{
// Seems that Apple decided to omit this attribute IF Control key alone
// is applied. If this key is present WITH NO setting then that NULL
// value is used for the modifier mask...
object = [NSNumber numberWithUnsignedInteger: 0];
}
else
{
// If the modifier mask element is present then no modifier attributes