mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Yet another attempt to get the modifier mask XIB5 processing correct
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40481 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9c3c3d8b8d
commit
528f069d36
1 changed files with 18 additions and 7 deletions
|
@ -1321,13 +1321,23 @@ didStartElement: (NSString*)elementName
|
|||
{
|
||||
id object = nil;
|
||||
NSDictionary *attributes = [[element elementForKey: @"keyEquivalentModifierMask"] attributes];
|
||||
|
||||
|
||||
// ??? SKIP modifier mask processing if BASE64-UTF8 string being used ???
|
||||
if (attributes == nil)
|
||||
{
|
||||
// Seems that Apple decided to omit this attribute IF certain default keys alone
|
||||
// are applied. If this key is present WITH NO setting then the following is
|
||||
// used for the modifier mask...
|
||||
object = [NSNumber numberWithUnsignedInteger: NSCommandKeyMask];
|
||||
if (([element elementForKey: @"keyEquivalent"]) &&
|
||||
([[element elementForKey: @"keyEquivalent"] attributeForKey: @"base64-UTF8"]))
|
||||
{
|
||||
NSWarnMLog(@"no modifier mask for title: %@", [element attributeForKey: @"title"]);
|
||||
object = [NSNumber numberWithUnsignedInt: 0];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Seems that Apple decided to omit this attribute IF certain default keys alone
|
||||
// are applied. If this key is present WITH NO setting then the following is
|
||||
// used for the modifier mask...
|
||||
object = [NSNumber numberWithUnsignedInt: NSCommandKeyMask];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1368,7 +1378,7 @@ didStartElement: (NSString*)elementName
|
|||
mask |= NSFunctionKeyMask;
|
||||
}
|
||||
|
||||
object = [NSNumber numberWithUnsignedInteger: mask];
|
||||
object = [NSNumber numberWithUnsignedInt: mask];
|
||||
}
|
||||
|
||||
return object;
|
||||
|
@ -2599,7 +2609,8 @@ didStartElement: (NSString*)elementName
|
|||
|
||||
// keyEquivalentModifierMask...
|
||||
mask.value |= [[self decodeModifierMaskForElement: element] unsignedIntValue];
|
||||
|
||||
NSWarnMLog(@"title: %@ %p", [element attributeForKey: @"title"], mask.value);
|
||||
|
||||
// Return value...
|
||||
value = [NSNumber numberWithUnsignedInteger: mask.value];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue