win32 menus must accept all of the accelerators
This commit is contained in:
+10
-1
@@ -860,6 +860,7 @@ BOOL onListChar(HWND hWnd, HWND hwndList, WORD ch)
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
PNHMenuWindow data;
|
PNHMenuWindow data;
|
||||||
int topIndex, pageSize;
|
int topIndex, pageSize;
|
||||||
|
boolean is_accelerator = FALSE;
|
||||||
|
|
||||||
data = (PNHMenuWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
data = (PNHMenuWindow)GetWindowLong(hWnd, GWL_USERDATA);
|
||||||
|
|
||||||
@@ -1085,8 +1086,16 @@ BOOL onListChar(HWND hWnd, HWND hwndList, WORD ch)
|
|||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is_accelerator = FALSE;
|
||||||
|
for(i=0; i<data->menu.size; i++) {
|
||||||
|
if( data->menu.items[i].accelerator == ch ) {
|
||||||
|
is_accelerator = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( (ch>='a' && ch<='z') ||
|
if( (ch>='a' && ch<='z') ||
|
||||||
(ch>='A' && ch<='Z') ) {
|
(ch>='A' && ch<='Z') || is_accelerator) {
|
||||||
if (data->how == PICK_ANY || data->how == PICK_ONE) {
|
if (data->how == PICK_ANY || data->how == PICK_ONE) {
|
||||||
for(i=0; i<data->menu.size; i++ ) {
|
for(i=0; i<data->menu.size; i++ ) {
|
||||||
if( data->menu.items[i].accelerator == ch ) {
|
if( data->menu.items[i].accelerator == ch ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user