This should be slightly more efficient.
This patch also changes the type of struct gui_theme->sep_str from
const char * to plain char and renames the field to sep_char. It must
be a single-character string anyway.
For the colorful blackness theme we now use the default character
from curses.h rather than '-'. This looks nicer. Tested with ncurses
on Linux and the curses implementation that ships with NetBSD.
*/
static void init_wins(int top_lines)
{
- int i;
-
top.lines = top_lines;
top.cols = COLS;
top.begy = 0;
keypad(in.win, 1);
}
wmove(sep.win, 0, 0);
- for (i = 1; i <= COLS; i++)
- waddstr(sep.win, theme.sep_str);
+ whline(sep.win, theme.sep_char, COLS);
wclear(top.win);
//wclear(bot.win);
wnoutrefresh(top.win);
int msg_fg, msg_bg;
int err_msg_fg, err_msg_bg;
int sep_fg, sep_bg;
- const char *sep_str;
+ char sep_char;
int default_fg, default_bg;
int top_lines_default, top_lines_min;
t->sep_fg = COLOR_CYAN;
t->default_fg = COLOR_WHITE;
t->default_bg = COLOR_BLUE;
- t->sep_str = "*";
+ t->sep_char = '*';
d[SI_BASENAME].prefix = "";
d[SI_BASENAME].postfix = "";
t->err_msg_fg = COLOR_WHITE;
t->sep_bg = COLOR_BLACK; /* color of the separator */
t->sep_fg = COLOR_BLUE;
- t->sep_str = "-";
+ t->sep_char = 0; /* default (ACS_HLINE) */
t->default_bg = COLOR_BLACK;
t->default_fg = COLOR_MAGENTA;