Adapt menu to ncurses ABI 6, and clear a warning
This commit is contained in:
parent
6f48f76f20
commit
2ce3688e69
3 changed files with 7 additions and 1 deletions
|
@ -125,7 +125,7 @@ zconf.tab.o: zconf.tab.c lex.zconf.c $(srcdir)/confdata.c $(srcdir)/expr.c \
|
|||
.PHONY: ncurses
|
||||
|
||||
ncurses:
|
||||
@echo "main() {}" > lxtemp.c
|
||||
@echo "int main() {}" > lxtemp.c
|
||||
@if $(HOSTCC) lxtemp.c $(LIBS) ; then \
|
||||
rm -f lxtemp.c a.out; \
|
||||
else \
|
||||
|
|
|
@ -269,7 +269,9 @@ dialog_menu (const char *title, const char *prompt, int height, int width,
|
|||
print_arrows(dialog, item_no, scroll,
|
||||
box_y, box_x+item_x+1, menu_height);
|
||||
|
||||
wbkgdset (dialog, 0);
|
||||
print_buttons (dialog, height, width, 0);
|
||||
wbkgdset (dialog, dialog_attr & A_COLOR);
|
||||
wmove (menu, choice, item_x+1);
|
||||
wrefresh (menu);
|
||||
|
||||
|
@ -390,7 +392,9 @@ dialog_menu (const char *title, const char *prompt, int height, int width,
|
|||
button = ((key == KEY_LEFT ? --button : ++button) < 0)
|
||||
? 2 : (button > 2 ? 0 : button);
|
||||
|
||||
wbkgdset (dialog, 0);
|
||||
print_buttons(dialog, height, width, button);
|
||||
wbkgdset (dialog, dialog_attr & A_COLOR);
|
||||
wrefresh (menu);
|
||||
break;
|
||||
case ' ':
|
||||
|
|
|
@ -117,7 +117,9 @@ dialog_textbox (const char *title, const char *file, int height, int width)
|
|||
waddstr (dialog, (char *)title);
|
||||
waddch (dialog, ' ');
|
||||
}
|
||||
wbkgdset (dialog, 0);
|
||||
print_button (dialog, " Exit ", height - 2, width / 2 - 4, TRUE);
|
||||
wbkgdset (dialog, dialog_attr & A_COLOR);
|
||||
wnoutrefresh (dialog);
|
||||
getyx (dialog, cur_y, cur_x); /* Save cursor position */
|
||||
|
||||
|
|
Reference in a new issue