summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/lxdialog/menubox.c
diff options
context:
space:
mode:
authorLinus Torvalds2013-07-11 01:06:46 +0200
committerLinus Torvalds2013-07-11 01:06:46 +0200
commitb202c0d5205662fd96f7151afa83f891f2f4d542 (patch)
tree1e44a453662d0a8b26b3d7799f280f6ddbd67403 /scripts/kconfig/lxdialog/menubox.c
parentMerge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek... (diff)
parentkconfig: allow "hex" and "range" to support longs (diff)
downloadkernel-qcow2-linux-b202c0d5205662fd96f7151afa83f891f2f4d542.tar.gz
kernel-qcow2-linux-b202c0d5205662fd96f7151afa83f891f2f4d542.tar.xz
kernel-qcow2-linux-b202c0d5205662fd96f7151afa83f891f2f4d542.zip
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kconfig updates from Michal Marek: - dependency solver fix for make defconfig - randconfig fixes, one of which had to be reverted again - more user-friendly sorting of search results - hex and range keywords support longs - fix for [mn]conf not to rely on particular behavior of the LINES and COLS variables - cleanup of magic constants in kconfig/lxdialog - [mn]conf formatting fixes - fix for scripts/config's help text in out-of-tree usage (under a different name) * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kconfig: allow "hex" and "range" to support longs Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG" kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG kconfig: loop as long as we changed some symbols in randconfig kconfig/[mn]conf: make it explicit in the search box that a regexp is possible kconfig: sort found symbols by relevance kconfig/conf: print the seed used to initialise the RNG for randconfig kconfig/conf: accept a base-16 seed for randconfig kconfig/conf: fix randconfig setting multiple symbols in a choice scripts/config: replace hard-coded script name by a dynamic value mconf/nconf: mark empty menus/menuconfigs different from non-empty ones nconf: use function calls instead of ncurses' variables LINES and COLS mconf: use function calls instead of ncurses' variables LINES and COLS kconfig/lxdialog: handle newline characters in print_autowrap() kconfig/lxdialog: Use new mininimum resize definitions in conf_choice() kconfig/lxdialog: Add definitions for mininimum (re)size values kconfig: Fix defconfig when one choice menu selects options that another choice menu depends on
Diffstat (limited to 'scripts/kconfig/lxdialog/menubox.c')
-rw-r--r--scripts/kconfig/lxdialog/menubox.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c
index 38cd69c5660e..c93de0b2faca 100644
--- a/scripts/kconfig/lxdialog/menubox.c
+++ b/scripts/kconfig/lxdialog/menubox.c
@@ -193,7 +193,7 @@ int dialog_menu(const char *title, const char *prompt,
do_resize:
height = getmaxy(stdscr);
width = getmaxx(stdscr);
- if (height < 15 || width < 65)
+ if (height < MENUBOX_HEIGTH_MIN || width < MENUBOX_WIDTH_MIN)
return -ERRDISPLAYTOOSMALL;
height -= 4;
@@ -203,8 +203,8 @@ do_resize:
max_choice = MIN(menu_height, item_count());
/* center dialog box on screen */
- x = (COLS - width) / 2;
- y = (LINES - height) / 2;
+ x = (getmaxx(stdscr) - width) / 2;
+ y = (getmaxy(stdscr) - height) / 2;
draw_shadow(stdscr, y, x, height, width);