From b2296f0762c91f487672db3080e56267b120707f Mon Sep 17 00:00:00 2001 From: jkh Date: Fri, 17 Dec 1999 02:44:09 +0000 Subject: *Really* make space accelerators work; no wonder Brian McGovern was confused! I fat-fingered the first commit. --- gnu/lib/libdialog/checklist.c | 2 +- gnu/lib/libdialog/menubox.c | 2 +- gnu/lib/libdialog/radiolist.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/lib/libdialog') diff --git a/gnu/lib/libdialog/checklist.c b/gnu/lib/libdialog/checklist.c index 5db04c7..3476f7d 100644 --- a/gnu/lib/libdialog/checklist.c +++ b/gnu/lib/libdialog/checklist.c @@ -255,7 +255,7 @@ draw: /* Check if key pressed matches first character of any item tag in list */ for (i = 0; i < max_choice; i++) - if (isprint(key) && key < 0x100 && toupper(key) == toupper(items[(scroll+i)*3][0])) + if (key != ' ' && key < 0x100 && toupper(key) == toupper(items[(scroll+i)*3][0])) break; if (i < max_choice || (key >= '1' && key <= MIN('9', '0'+max_choice)) || diff --git a/gnu/lib/libdialog/menubox.c b/gnu/lib/libdialog/menubox.c index 77b82ee..061c367 100644 --- a/gnu/lib/libdialog/menubox.c +++ b/gnu/lib/libdialog/menubox.c @@ -233,7 +233,7 @@ draw: /* Check if key pressed matches first character of any item tag in menu */ for (i = 0; i < max_choice; i++) - if (key < 0x100 && isprint(key) && toupper(key) == toupper(items[(scroll + i) * 2][0])) + if (key < 0x100 && key != ' ' && toupper(key) == toupper(items[(scroll + i) * 2][0])) break; if (i < max_choice || (key >= '1' && key <= MIN('9', '0'+max_choice)) || KEY_IS_UP(key) || KEY_IS_DOWN(key)) { diff --git a/gnu/lib/libdialog/radiolist.c b/gnu/lib/libdialog/radiolist.c index c1f5ce6..1dec89e 100644 --- a/gnu/lib/libdialog/radiolist.c +++ b/gnu/lib/libdialog/radiolist.c @@ -265,7 +265,7 @@ draw: /* Check if key pressed matches first character of any item tag in list */ for (i = 0; i < max_choice; i++) - if (isprint(key) && toupper(key) == toupper(items[(scroll + i) * 3][0])) + if (key != ' ' && toupper(key) == toupper(items[(scroll + i) * 3][0])) break; if (i < max_choice || (key >= '1' && key <= MIN('9', '0' + max_choice)) || KEY_IS_UP(key) || KEY_IS_DOWN(key) || key == ' ') { -- cgit v1.1