lkml.org 
[lkml]   [2006]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] Enhancing accessibility of lxdialog
Hi,

Some fix that I forgot for good accessibility of lxdialog (the cursor
should always be left at the focus location):


Have the checklist display the currently highlighted entry last, for
having the cursor left on it (rather than on the last line of the list).

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c
index be0200e..7988641 100644
--- a/scripts/kconfig/lxdialog/checklist.c
+++ b/scripts/kconfig/lxdialog/checklist.c
@@ -187,9 +187,12 @@ int dialog_checklist(const char *title,

/* Print the list */
for (i = 0; i < max_choice; i++) {
- print_item(list, items[(scroll + i) * 3 + 1],
- status[i + scroll], i, i == choice);
+ if (i != choice)
+ print_item(list, items[(scroll + i) * 3 + 1],
+ status[i + scroll], i, 0);
}
+ print_item(list, items[(scroll + choice) * 3 + 1],
+ status[choice + scroll], choice, 1);

print_arrows(dialog, choice, item_no, scroll,
box_y, box_x + check_x + 5, list_height);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-04-18 19:50    [W:0.736 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site