Interface Kit: Fix missing Alt key in menu shortcuts
The shortcut detection was working, just not the display of the modifiers in the menu. I've added back the necessary code to fix this in BMenuItem. BWindow does the heavy lifting of preparing the keys and modifiers. I have changes _FindShortcut() used by BMenuItem to send the prepared modifiers back to BMenuItem. Set the parameters raw in the constructor, they will get fixed up in Install(). I also make sure to use the prepped version of the key and mods in BWindow::AddShortcut() to remove the old one. This is a minor update that eliminates an edge failure case of malformed input. Fixes #19395 a regression from hrev58589. Change-Id: I4333f89149ff843f92dbffbd53d58ffc2def6760 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8943 Tested-by: Commit checker robot <[email protected]> Reviewed-by: John Scipione <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
2c7072f33c
commit
5ee786c31f
@@ -316,7 +316,7 @@ private:
|
||||
BPoint AlertPosition(const BRect& frame);
|
||||
virtual BMessage* ConvertToMessage(void* raw, int32 code);
|
||||
|
||||
void _AddShortcut(uint32 key, uint32 modifiers,
|
||||
void _AddShortcut(uint32* _key, uint32* _modifiers,
|
||||
BMenuItem* item);
|
||||
BHandler* _DetermineTarget(BMessage* message,
|
||||
BHandler* target);
|
||||
|
||||
Reference in New Issue
Block a user