diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-07-24 15:40:46 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@neptun.ravnborg.org> | 2006-09-30 05:19:19 -0400 |
commit | 98e5a1579e7d34fe3803240750a1c48efcd9cb15 (patch) | |
tree | 433f6b354eb0bb6fa01f325237f9f4651bf5ac9f /scripts/kconfig/lxdialog/yesno.c | |
parent | bf603625660b1742004bf86432ce3c210d14d4fd (diff) |
kconfig/lxdialog: refactor color support
Clean up and refactor color support. All color support are now
in util.c including color definitions.
In the process introduced a global variable named 'dlg' which is
used all over to set color - thats the reason why all files are changed.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/kconfig/lxdialog/yesno.c')
-rw-r--r-- | scripts/kconfig/lxdialog/yesno.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/kconfig/lxdialog/yesno.c b/scripts/kconfig/lxdialog/yesno.c index cb2568aae3ed..e938037c8020 100644 --- a/scripts/kconfig/lxdialog/yesno.c +++ b/scripts/kconfig/lxdialog/yesno.c | |||
@@ -53,17 +53,18 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width) | |||
53 | dialog = newwin(height, width, y, x); | 53 | dialog = newwin(height, width, y, x); |
54 | keypad(dialog, TRUE); | 54 | keypad(dialog, TRUE); |
55 | 55 | ||
56 | draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr); | 56 | draw_box(dialog, 0, 0, height, width, |
57 | wattrset(dialog, border_attr); | 57 | dlg.dialog.atr, dlg.border.atr); |
58 | wattrset(dialog, dlg.border.atr); | ||
58 | mvwaddch(dialog, height - 3, 0, ACS_LTEE); | 59 | mvwaddch(dialog, height - 3, 0, ACS_LTEE); |
59 | for (i = 0; i < width - 2; i++) | 60 | for (i = 0; i < width - 2; i++) |
60 | waddch(dialog, ACS_HLINE); | 61 | waddch(dialog, ACS_HLINE); |
61 | wattrset(dialog, dialog_attr); | 62 | wattrset(dialog, dlg.dialog.atr); |
62 | waddch(dialog, ACS_RTEE); | 63 | waddch(dialog, ACS_RTEE); |
63 | 64 | ||
64 | print_title(dialog, title, width); | 65 | print_title(dialog, title, width); |
65 | 66 | ||
66 | wattrset(dialog, dialog_attr); | 67 | wattrset(dialog, dlg.dialog.atr); |
67 | print_autowrap(dialog, prompt, width - 2, 1, 3); | 68 | print_autowrap(dialog, prompt, width - 2, 1, 3); |
68 | 69 | ||
69 | print_buttons(dialog, height, width, 0); | 70 | print_buttons(dialog, height, width, 0); |