Skip to content
Snippets Groups Projects
Commit f043ca43 authored by Samuel Thibault's avatar Samuel Thibault Committed by Linus Torvalds
Browse files

[PATCH] Enhancing accessibility of lxdialog


For easily getting fairly good accessibility, the TTY cursor should
always be left at the focus location.  This patch fixes the checklist by
just having the list refreshed after the dialog box (hence the cursor
position remains in the list).

Signed-off-by: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9a7e9f1c
No related branches found
No related tags found
No related merge requests found
...@@ -196,8 +196,8 @@ int dialog_checklist(const char *title, const char *prompt, int height, ...@@ -196,8 +196,8 @@ int dialog_checklist(const char *title, const char *prompt, int height,
print_buttons(dialog, height, width, 0); print_buttons(dialog, height, width, 0);
wnoutrefresh(list);
wnoutrefresh(dialog); wnoutrefresh(dialog);
wnoutrefresh(list);
doupdate(); doupdate();
while (key != ESC) { while (key != ESC) {
...@@ -225,12 +225,11 @@ int dialog_checklist(const char *title, const char *prompt, int height, ...@@ -225,12 +225,11 @@ int dialog_checklist(const char *title, const char *prompt, int height,
} }
scroll--; scroll--;
print_item(list, items[scroll * 3 + 1], status[scroll], 0, TRUE); print_item(list, items[scroll * 3 + 1], status[scroll], 0, TRUE);
wnoutrefresh(list);
print_arrows(dialog, choice, item_no, print_arrows(dialog, choice, item_no,
scroll, box_y, box_x + check_x + 5, list_height); scroll, box_y, box_x + check_x + 5, list_height);
wrefresh(dialog); wnoutrefresh(dialog);
wrefresh(list);
continue; /* wait for another key press */ continue; /* wait for another key press */
} else } else
...@@ -252,12 +251,12 @@ int dialog_checklist(const char *title, const char *prompt, int height, ...@@ -252,12 +251,12 @@ int dialog_checklist(const char *title, const char *prompt, int height,
scroll++; scroll++;
print_item(list, items[(scroll + max_choice - 1) * 3 + 1], print_item(list, items[(scroll + max_choice - 1) * 3 + 1],
status[scroll + max_choice - 1], max_choice - 1, TRUE); status[scroll + max_choice - 1], max_choice - 1, TRUE);
wnoutrefresh(list);
print_arrows(dialog, choice, item_no, print_arrows(dialog, choice, item_no,
scroll, box_y, box_x + check_x + 5, list_height); scroll, box_y, box_x + check_x + 5, list_height);
wrefresh(dialog); wnoutrefresh(dialog);
wrefresh(list);
continue; /* wait for another key press */ continue; /* wait for another key press */
} else } else
...@@ -271,8 +270,8 @@ int dialog_checklist(const char *title, const char *prompt, int height, ...@@ -271,8 +270,8 @@ int dialog_checklist(const char *title, const char *prompt, int height,
choice = i; choice = i;
print_item(list, items[(scroll + choice) * 3 + 1], print_item(list, items[(scroll + choice) * 3 + 1],
status[scroll + choice], choice, TRUE); status[scroll + choice], choice, TRUE);
wnoutrefresh(list); wnoutrefresh(dialog);
wrefresh(dialog); wrefresh(list);
} }
continue; /* wait for another key press */ continue; /* wait for another key press */
} }
...@@ -306,8 +305,8 @@ int dialog_checklist(const char *title, const char *prompt, int height, ...@@ -306,8 +305,8 @@ int dialog_checklist(const char *title, const char *prompt, int height,
print_item(list, items[(scroll + i) * 3 + 1], print_item(list, items[(scroll + i) * 3 + 1],
status[scroll + i], i, i == choice); status[scroll + i], i, i == choice);
} }
wnoutrefresh(list); wnoutrefresh(dialog);
wrefresh(dialog); wrefresh(list);
for (i = 0; i < item_no; i++) for (i = 0; i < item_no; i++)
if (status[i]) if (status[i])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment