[ wxwindows-Bugs-1741073 ] F13-F15 glyphs for menu shortcut off by 1
SourceForge.net
noreply at sourceforge.net
Sun Jul 22 08:22:06 PDT 2007
Bugs item #1741073, was opened at 2007-06-21 18:42
Message generated for change (Settings changed) made by csomor
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1741073&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxMac specific
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Ryan Wilcox (ryanwilcox)
Assigned to: Stefan Csomor (csomor)
Summary: F13-F15 glyphs for menu shortcut off by 1
Initial Comment:
There's an off by one error for getting the F13-F15 glyph for menu shortcuts.
In UMASetMenuItemShortcut(...):
SInt16 glyph = 0 ;
SInt16 macKey = key ;
if ( key >= WXK_F1 && key <= WXK_F15 )
{
// for some reasons this must be 0 right now
// everything else leads to just the first function key item
// to be selected. Thanks to Ryan Wilcox for finding out.
macKey = 0 ;
glyph = kMenuF1Glyph + ( key - WXK_F1 ) ;
if ( key >= WXK_F13 )
glyph += 13 ;
if ( !explicitCommandKey )
modifiers |= kMenuNoCommandModifier ;
}
The glyph += 13 should be glyph += 12.
>From Menus.h:
kMenuF11Glyph = 0x79, /* F11 key*/
kMenuF12Glyph = 0x7A, /* F12 key*/
kMenuF13Glyph = 0x87, /* F13 key*/
kMenuF14Glyph = 0x88, /* F14 key*/
kMenuF15Glyph = 0x89, /* F15 key*/
0x7A = 122 and 0x89 = 135. 135 - 122 = 13, yes, except we need to subtract 1 to make the menu shortcut use the F13 glyph (and not the F14 glyph).
----------------------------------------------------------------------
Comment By: Stefan Csomor (csomor)
Date: 2007-07-22 17:21
Message:
Logged In: YES
user_id=81467
Originator: NO
applied to 2.8 with thanks,
Stefan
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1741073&group_id=9863
More information about the wx-dev
mailing list