gui: fix bug 29635 NSMenuItem -initWithCoder: should set modifier mask to 0 if NSKeyEquivModMask not defined

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30229 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2010-04-24 00:03:30 +00:00
parent 0ebc6d3185
commit 165dcffe60
2 changed files with 13 additions and 5 deletions

View file

@ -1,3 +1,9 @@
2010-04-23 Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSMenuItem.m: Fix for bug 29635
(NSMenuItem -initWithCoder: should set modifier mask to 0 if
NSKeyEquivModMask not defined)
2010-04-23 Jonathan Gillaspie <jonathan.gillaspie@testplant.com>
* Source/NSWindowController.m: Fixed a problem where controller marks

View file

@ -566,6 +566,7 @@ static Class imageClass;
NSString *action;
NSString *key;
BOOL isSeparator = NO;
int keyMask;
if ([aDecoder containsValueForKey: @"NSIsSeparator"])
{
@ -617,11 +618,12 @@ static Class imageClass;
NSMenu *submenu = [aDecoder decodeObjectForKey: @"NSSubmenu"];
[self setSubmenu: submenu];
}
if ([aDecoder containsValueForKey: @"NSKeyEquivModMask"])
{
int keyMask = [aDecoder decodeIntForKey: @"NSKeyEquivModMask"];
[self setKeyEquivalentModifierMask: keyMask];
}
// Set the key mask regardless of whether it is present;
// i.e. set it to 0 if it is not present in the nib.
keyMask = [aDecoder decodeIntForKey: @"NSKeyEquivModMask"];
[self setKeyEquivalentModifierMask: keyMask];
if ([aDecoder containsValueForKey: @"NSMnemonicLoc"])
{
int loc = [aDecoder decodeIntForKey: @"NSMnemonicLoc"];