summaryrefslogtreecommitdiff
path: root/gnu/lib/libdialog
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2010-08-24 06:30:46 +0000
committerWarner Losh <imp@FreeBSD.org>2010-08-24 06:30:46 +0000
commitb57429d0820250b6329535bf5a39d60305c79efb (patch)
tree0f7847349bf6115fb9a5c767ed8e63d0b4247b59 /gnu/lib/libdialog
parentb3b8bde7048030a1331a9cab204a5e79984b5d18 (diff)
Notes
Diffstat (limited to 'gnu/lib/libdialog')
-rw-r--r--gnu/lib/libdialog/checklist.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gnu/lib/libdialog/checklist.c b/gnu/lib/libdialog/checklist.c
index dc65d755b86e..e349ca6bf07e 100644
--- a/gnu/lib/libdialog/checklist.c
+++ b/gnu/lib/libdialog/checklist.c
@@ -198,6 +198,24 @@ draw:
wnoutrefresh(dialog);
wmove(list, choice, check_x+1);
wrefresh(list);
+
+ /*
+ * XXX Black magic voodoo that allows printing to the checklist
+ * window. For some reason, if this "refresh" code is not in
+ * place, printing to the window from the selected callback
+ * prints "behind" the checklist window. There is probably a
+ * better way to do this.
+ */
+ draw_box(dialog, box_y, box_x, list_height + 2, list_width + 2, menubox_border_attr, menubox_attr);
+
+ for (i = 0; i < max_choice; i++)
+ print_item(list, items[i * 3], items[i * 3 + 1], status[i], i, i == choice, DREF(ditems, i), list_width, item_x, check_x);
+ print_arrows(dialog, scroll, list_height, item_no, box_x, box_y, check_x + 4, cur_x, cur_y);
+
+ wmove(list, choice, check_x+1);
+ wnoutrefresh(dialog);
+ wrefresh(list);
+ /* XXX Black magic XXX */
while (key != ESC) {
key = wgetch(dialog);