mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
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:
parent
05060dd539
commit
860d089686
1 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue