curses menu_heading repairs
This commit is contained in:
@@ -1175,7 +1175,7 @@ menu_display_page(
|
|||||||
int count, curletter, entry_cols, start_col, num_lines;
|
int count, curletter, entry_cols, start_col, num_lines;
|
||||||
char *tmpstr;
|
char *tmpstr;
|
||||||
boolean first_accel = TRUE;
|
boolean first_accel = TRUE;
|
||||||
int color = NO_COLOR, attr = A_NORMAL;
|
int color = NO_COLOR, attr;
|
||||||
|
|
||||||
/* letters assigned to entries on current page */
|
/* letters assigned to entries on current page */
|
||||||
if (selectors)
|
if (selectors)
|
||||||
@@ -1280,14 +1280,12 @@ menu_display_page(
|
|||||||
start_col += 2;
|
start_col += 2;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (color != NO_COLOR)
|
color = menu_item_ptr->color;
|
||||||
color = menu_item_ptr->color;
|
|
||||||
|
|
||||||
if (color == NO_COLOR)
|
if (color == NO_COLOR)
|
||||||
color = NONE;
|
color = NONE;
|
||||||
attr = menu_item_ptr->attr;
|
attr = menu_item_ptr->attr;
|
||||||
attr = curses_convert_attr(attr);
|
/* attr is already a curses attr (A_ not ATR_) */
|
||||||
if (color != NONE || attr != A_NORMAL)
|
if (color != NONE || attr != A_NORMAL)
|
||||||
curses_menu_color_attr(win, color, attr, ON);
|
curses_menu_color_attr(win, color, attr, ON);
|
||||||
|
|
||||||
num_lines = curses_num_lines(menu_item_ptr->str, entry_cols);
|
num_lines = curses_num_lines(menu_item_ptr->str, entry_cols);
|
||||||
|
|||||||
@@ -375,7 +375,7 @@ curs_show_invt(WINDOW *win)
|
|||||||
for (lineno = pi.rowoffset; lineno < pi.inuseindx; ++lineno) {
|
for (lineno = pi.rowoffset; lineno < pi.inuseindx; ++lineno) {
|
||||||
str = pi.array[lineno].invtxt;
|
str = pi.array[lineno].invtxt;
|
||||||
accelerator = pi.array[lineno].letter;
|
accelerator = pi.array[lineno].letter;
|
||||||
attr = curses_convert_attr(pi.array[lineno].c_attr);
|
attr = pi.array[lineno].c_attr; /* already converted when stored */
|
||||||
color = pi.array[lineno].color;
|
color = pi.array[lineno].color;
|
||||||
if (color == NO_COLOR)
|
if (color == NO_COLOR)
|
||||||
color = NONE;
|
color = NONE;
|
||||||
|
|||||||
@@ -80,8 +80,7 @@ curses_toggle_color_attr(WINDOW *win, int color, int attr, int onoff)
|
|||||||
{
|
{
|
||||||
if (color == NO_COLOR)
|
if (color == NO_COLOR)
|
||||||
color = NONE;
|
color = NONE;
|
||||||
if (attr == ATR_NONE)
|
|
||||||
attr = NONE;
|
|
||||||
#ifdef TEXTCOLOR
|
#ifdef TEXTCOLOR
|
||||||
int curses_color;
|
int curses_color;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user