aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/lxdialog/yesno.c
diff options
context:
space:
mode:
authorSedat Dilek <sedat.dilek@gmail.com>2013-06-15 05:07:35 -0400
committerYann E. MORIN <yann.morin.1998@free.fr>2013-06-16 05:09:56 -0400
commit851f665725581d02d48ffbca50240cda44d698d4 (patch)
tree37b5334076beafc4564697545bd676b3df2029cd /scripts/kconfig/lxdialog/yesno.c
parentfbe98bb9ed3dae23e320c6b113e35f129538d14a (diff)
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 <sedat.dilek@gmail.com> Acked-by: Wang YanQing <udknight@gmail.com> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Diffstat (limited to 'scripts/kconfig/lxdialog/yesno.c')
-rw-r--r--scripts/kconfig/lxdialog/yesno.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/kconfig/lxdialog/yesno.c b/scripts/kconfig/lxdialog/yesno.c
index 4e6e8090c20b..abb0c392e01b 100644
--- a/scripts/kconfig/lxdialog/yesno.c
+++ b/scripts/kconfig/lxdialog/yesno.c
@@ -45,9 +45,9 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width)
45 WINDOW *dialog; 45 WINDOW *dialog;
46 46
47do_resize: 47do_resize:
48 if (getmaxy(stdscr) < (height + 4)) 48 if (getmaxy(stdscr) < (height + YESNO_HEIGTH_MIN))
49 return -ERRDISPLAYTOOSMALL; 49 return -ERRDISPLAYTOOSMALL;
50 if (getmaxx(stdscr) < (width + 4)) 50 if (getmaxx(stdscr) < (width + YESNO_WIDTH_MIN))
51 return -ERRDISPLAYTOOSMALL; 51 return -ERRDISPLAYTOOSMALL;
52 52
53 /* center dialog box on screen */ 53 /* center dialog box on screen */