summaryrefslogtreecommitdiffstats
path: root/scripts/lxdialog/textbox.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
commit78c388aed2b7184182c08428db1de6c872d815f5 (patch)
tree4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /scripts/lxdialog/textbox.c
parenteb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff)
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'scripts/lxdialog/textbox.c')
-rw-r--r--scripts/lxdialog/textbox.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/lxdialog/textbox.c b/scripts/lxdialog/textbox.c
index df50f2c54..415a42f87 100644
--- a/scripts/lxdialog/textbox.c
+++ b/scripts/lxdialog/textbox.c
@@ -90,6 +90,8 @@ dialog_textbox (const char *title, const char *file, int height, int width)
/* Create window for text region, used for scrolling text */
text = subwin (dialog, height - 4, width - 2, y + 1, x + 1);
+ wattrset (text, dialog_attr);
+ wbkgdset (text, dialog_attr & A_COLOR);
keypad (text, TRUE);
@@ -101,6 +103,7 @@ dialog_textbox (const char *title, const char *file, 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) {
@@ -448,7 +451,7 @@ print_page (WINDOW * win, int height, int width)
static void
print_line (WINDOW * win, int row, int width)
{
- int i, y, x;
+ int y, x;
char *line;
line = get_line ();
@@ -459,8 +462,15 @@ print_line (WINDOW * win, int row, int width)
getyx (win, y, x);
/* Clear 'residue' of previous line */
- for (i = 0; i < width - x; i++)
- waddch (win, ' ');
+#if OLD_NCURSES
+ {
+ int i;
+ for (i = 0; i < width - x; i++)
+ waddch (win, ' ');
+ }
+#else
+ wclrtoeol(win);
+#endif
}
/*
@@ -530,6 +540,7 @@ print_position (WINDOW * win, int height, int width)
exit (-1);
}
wattrset (win, position_indicator_attr);
+ wbkgdset (win, position_indicator_attr & A_COLOR);
percent = !file_size ?
100 : ((fpos - bytes_read + page - buf) * 100) / file_size;
wmove (win, height - 3, width - 9);