diff options
author | Bryan Hundven <bryanhundven@gmail.com> | 2015-09-01 23:11:30 (GMT) |
---|---|---|
committer | Bryan Hundven <bryanhundven@gmail.com> | 2015-09-04 02:00:28 (GMT) |
commit | 0cffa79d9fb3d5476d7a1dbeda617aea7a6851b2 (patch) | |
tree | 7339c7fff49ed2cd2e06c042bc1bc35a20f5a381 /kconfig/lxdialog/checklist.c | |
parent | 74b09f9c4a07a8f561001f4a727259b2d5eced77 (diff) |
kconfig: Update kconfig. Sync with Linux-4.2
This change updates the kconfig utility to what is shipped with 4.2.0.
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
Diffstat (limited to 'kconfig/lxdialog/checklist.c')
-rw-r--r-- | kconfig/lxdialog/checklist.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kconfig/lxdialog/checklist.c b/kconfig/lxdialog/checklist.c index a2eb80f..8d016fa 100644 --- a/kconfig/lxdialog/checklist.c +++ b/kconfig/lxdialog/checklist.c @@ -132,16 +132,16 @@ int dialog_checklist(const char *title, const char *prompt, int height, } do_resize: - if (getmaxy(stdscr) < (height + 6)) + if (getmaxy(stdscr) < (height + CHECKLIST_HEIGTH_MIN)) return -ERRDISPLAYTOOSMALL; - if (getmaxx(stdscr) < (width + 6)) + if (getmaxx(stdscr) < (width + CHECKLIST_WIDTH_MIN)) return -ERRDISPLAYTOOSMALL; max_choice = MIN(list_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); @@ -168,13 +168,13 @@ do_resize: /* create new window for the list */ list = subwin(dialog, list_height, list_width, y + box_y + 1, - x + box_x + 1); + x + box_x + 1); keypad(list, TRUE); /* draw a box around the list items */ draw_box(dialog, box_y, box_x, list_height + 2, list_width + 2, - dlg.menubox_border.atr, dlg.menubox.atr); + dlg.menubox_border.atr, dlg.menubox.atr); /* Find length of longest item in order to center checklist */ check_x = 0; |