diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-01-08 14:33:53 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-01-08 14:33:53 +0000 |
commit | 648b9ba08bd610b866b18a39de7a4572c2196cf3 (patch) | |
tree | ae40ed05ad376533dd6005724b9d3925e46a77d1 /scripts/config/lxdialog/yesno.c | |
parent | 074a033f4e45691e7b220eab76778aba5bc9b9f6 (diff) | |
download | master-187ad058-648b9ba08bd610b866b18a39de7a4572c2196cf3.tar.gz master-187ad058-648b9ba08bd610b866b18a39de7a4572c2196cf3.tar.bz2 master-187ad058-648b9ba08bd610b866b18a39de7a4572c2196cf3.zip |
scripts/config: sync with linux upstream
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43873 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts/config/lxdialog/yesno.c')
-rw-r--r-- | scripts/config/lxdialog/yesno.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/config/lxdialog/yesno.c b/scripts/config/lxdialog/yesno.c index 4e6e8090c2..676fb2f824 100644 --- a/scripts/config/lxdialog/yesno.c +++ b/scripts/config/lxdialog/yesno.c @@ -45,14 +45,14 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width) WINDOW *dialog; do_resize: - if (getmaxy(stdscr) < (height + 4)) + if (getmaxy(stdscr) < (height + YESNO_HEIGTH_MIN)) return -ERRDISPLAYTOOSMALL; - if (getmaxx(stdscr) < (width + 4)) + if (getmaxx(stdscr) < (width + YESNO_WIDTH_MIN)) return -ERRDISPLAYTOOSMALL; /* 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); |