diff options
Diffstat (limited to 'scripts/config/checklist.c')
-rw-r--r-- | scripts/config/checklist.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/config/checklist.c b/scripts/config/checklist.c index c4a9289..9744d79 100644 --- a/scripts/config/checklist.c +++ b/scripts/config/checklist.c @@ -120,7 +120,7 @@ int dialog_checklist (const char *title, const char *prompt, int height, int width, int list_height, int item_no, struct dialog_list_item ** items, int flag) - + { int i, x, y, box_x, box_y; int key = 0, button = 0, choice = 0, scroll = 0, max_choice, *status; @@ -195,7 +195,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, /* Find length of longest item in order to center checklist */ check_x = 0; - for (i = 0; i < item_no; i++) + for (i = 0; i < item_no; i++) check_x = MAX (check_x, + strlen (items[i]->name) + 4); check_x = (list_width - check_x) / 2; @@ -229,7 +229,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, break; - if ( i < max_choice || key == KEY_UP || key == KEY_DOWN || + if ( i < max_choice || key == KEY_UP || key == KEY_DOWN || key == '+' || key == '-' ) { if (key == KEY_UP || key == '-') { if (!choice) { @@ -337,7 +337,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, } wnoutrefresh (list); wrefresh (dialog); - + for (i = 0; i < item_no; i++) { items[i]->selected = status[i]; } @@ -355,7 +355,7 @@ dialog_checklist (const char *title, const char *prompt, int height, int width, /* Now, update everything... */ doupdate (); } - + delwin (dialog); free (status); |