Author: mlytwyn
Date: Fri Apr 14 18:54:41 2017
New Revision: 40481
URL: http://svn.gna.org/viewcvs/gnustep?rev=40481&view=rev
Log:
Yet another attempt to get the modifier mask XIB5 processing correct
Modified:
libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m
Modified:
libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m?rev=40481&r1=40480&r2=40481&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m
Fri Apr 14 18:54:41 2017
@@ -1321,13 +1321,23 @@
{
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 @@
mask |= NSFunctionKeyMask;
}
- object = [NSNumber numberWithUnsignedInteger: mask];
+ object = [NSNumber numberWithUnsignedInt: mask];
}
return object;
@@ -2599,7 +2609,8 @@
// keyEquivalentModifierMask...
mask.value |= [[self decodeModifierMaskForElement: element]
unsignedIntValue];
-
+ NSWarnMLog(@"title: %@ %p", [element attributeForKey: @"title"],
mask.value);
+
// Return value...
value = [NSNumber numberWithUnsignedInteger: mask.value];
}
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs