Author: mlytwyn
Date: Mon Apr 10 18:50:27 2017
New Revision: 40464
URL: http://svn.gna.org/viewcvs/gnustep?rev=40464&view=rev
Log:
Fix (again) the modifier mask processing for XIB5
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=40464&r1=40463&r2=40464&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m
Mon Apr 10 18:50:27 2017
@@ -1323,13 +1323,20 @@
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
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs