diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-01-04 16:03:48 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-01-04 16:03:48 +0000 |
commit | 78c388aed2b7184182c08428db1de6c872d815f5 (patch) | |
tree | 4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /scripts/lxdialog/menubox.c | |
parent | eb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff) |
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'scripts/lxdialog/menubox.c')
-rw-r--r-- | scripts/lxdialog/menubox.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/lxdialog/menubox.c b/scripts/lxdialog/menubox.c index 5d5a6b46f..d6170ec46 100644 --- a/scripts/lxdialog/menubox.c +++ b/scripts/lxdialog/menubox.c @@ -60,7 +60,7 @@ static int menu_width, item_x; static void print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey) { - int i, j; + int j; char menu_item[menu_width+1]; strncpy(menu_item, item, menu_width); @@ -70,8 +70,15 @@ print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey /* Clear 'residue' of last item */ wattrset (win, menubox_attr); wmove (win, choice, 0); - for (i = 0; i < menu_width; i++) - waddch (win, ' '); +#if OLD_NCURSES + { + int i; + for (i = 0; i < menu_width; i++) + waddch (win, ' '); + } +#else + wclrtoeol(win); +#endif wattrset (win, selected ? item_selected_attr : item_attr); mvwaddstr (win, choice, item_x, menu_item); if (hotkey) { @@ -173,6 +180,7 @@ dialog_menu (const char *title, const char *prompt, int height, int width, for (i = 0; i < width - 2; i++) waddch (dialog, ACS_HLINE); wattrset (dialog, dialog_attr); + wbkgdset (dialog, dialog_attr & A_COLOR); waddch (dialog, ACS_RTEE); if (title != NULL) { |