[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #29635] NSMenuItem -initWithCoder: should set modifier mask to 0 if
From: |
Eric Wasylishen |
Subject: |
[bug #29635] NSMenuItem -initWithCoder: should set modifier mask to 0 if NSKeyEquivModMask not defined |
Date: |
Wed, 21 Apr 2010 22:04:34 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1059 Safari/532.5 |
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 #29635] NSMenuItem -initWithCoder: should set modifier mask to 0 if NSKeyEquivModMask not defined,
Eric Wasylishen <=