URL:
<http://savannah.gnu.org/bugs/?29635>
Summary: NSMenuItem -initWithCoder: should set modifier mask
to 0 if NSKeyEquivModMask not defined
Project: GNUstep
Submitted by: ericw
Submitted on: Wed 21 Apr 2010 10:04:34 PM GMT
Category: Gui/AppKit
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Menu items created in Interface Builder with no modifier mask will have no
NSKeyEquivModMask key in the nib. (e.g. I am porting a Mac app where the
Escape key is a key equivalent for one menu item.)
However, when read by GNUstep, -[NSMenuItem initWithCoder:] only sets the
modifier mask if [aDecoder containsValueForKey: @"NSKeyEquivModMask"]. So
items with no modifier mask get the default modifier mask of
NSCommandKeyModifierMask.
The solution is to remove the if ([aDecoder containsValueForKey:
@"NSKeyEquivModMask"]) { } and set the modifier mask unconditionally, so if it
is not defined in the nib, it gets set to 0.
I posted this as a bug report because I'm not sure if this fix could have
other side effects (i.e. break GORM loading?)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?29635>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep