From 851f665725581d02d48ffbca50240cda44d698d4 Mon Sep 17 00:00:00 2001 From: Sedat Dilek Date: Sat, 15 Jun 2013 11:07:35 +0200 Subject: kconfig/lxdialog: Add definitions for mininimum (re)size values Commit c8dc68ad0fbd ("kconfig/lxdialog: support resize") added support for resizing, but forgot to collect all hardcoded values at one single place. Also add a definition for the check for a minimum screen/window size of 80x19. [ ChangeLog v3: * Rename MENU_{HEIGTH,WIDTH}_MIN -> MENUBOX_{HEIGTH,WIDTH}_MIN ChangeLog v2: * Rename WIN_{HEIGTH,WIDTH}_MIN -> WINDOW_{HEIGTH,WIDTH}_MIN * Mention the check for a minimum screen/window size in the changelog * Add a comment above the block of new definitions ] Signed-off-by: Sedat Dilek Acked-by: Wang YanQing Tested-by: "Yann E. MORIN" Reviewed-by: "Yann E. MORIN" Signed-off-by: "Yann E. MORIN" --- scripts/kconfig/lxdialog/inputbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/kconfig/lxdialog/inputbox.c') diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c index 21404a04d7c3..7b01add415a8 100644 --- a/scripts/kconfig/lxdialog/inputbox.c +++ b/scripts/kconfig/lxdialog/inputbox.c @@ -56,9 +56,9 @@ int dialog_inputbox(const char *title, const char *prompt, int height, int width strcpy(instr, init); do_resize: - if (getmaxy(stdscr) <= (height - 2)) + if (getmaxy(stdscr) <= (height - INPUTBOX_HEIGTH_MIN)) return -ERRDISPLAYTOOSMALL; - if (getmaxx(stdscr) <= (width - 2)) + if (getmaxx(stdscr) <= (width - INPUTBOX_WIDTH_MIN)) return -ERRDISPLAYTOOSMALL; /* center dialog box on screen */ -- cgit