add_menu follow-up, part 2 of interface adjustment
Remove menu_color support from the window port side of the interface.
The window port just has to honor the color parameter that was added
to the add_menu() interface definition in June 2022 commit
2770223d10, and let the core-side of
the interface handle things.
To that end, this does the following:
Removes the #define of add_menu() from include/winprocs.h and add a
real core-side add_menu() function to windows.c which acts as a
trampoline to the window port win_add_menu() function, while providing
a single location to adjust the parameters passed to the window port
function. get_menu_coloring() is now called in there.
Moves get_menu_coloring() from options.c into windows.c and makes it
static.
Removes all the calls to get_menu_coloring() from the tty, Qt, X11,
curses, and win32 interfaces and adjusts their code to simply honor
the color parameter in add_menu, similar to what the menu_headings
change from earlier today did.
This commit is contained in:
@@ -1419,11 +1419,8 @@ process_menu_window(winid window, struct WinDesc *cw)
|
||||
(void) putchar(' ');
|
||||
++ttyDisplay->curx;
|
||||
|
||||
if (!iflags.use_menu_color
|
||||
|| !get_menu_coloring(curr->str, &color, &attr)) {
|
||||
attr = curr->attr;
|
||||
color = curr->color;
|
||||
}
|
||||
attr = curr->attr;
|
||||
color = curr->color;
|
||||
|
||||
/* which character to start attribute highlighting;
|
||||
whole line for headers and such, after the selector
|
||||
|
||||
Reference in New Issue
Block a user