diff options
author | dteske <dteske@FreeBSD.org> | 2013-09-24 14:52:43 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2013-09-24 14:52:43 +0000 |
commit | 6633bf70ed24c304037f64ca2f28e6ea8d2a0b47 (patch) | |
tree | 928bd26d2edefc51e3476336efb87361f214c616 /contrib/dialog/checklist.c | |
parent | 8a88ce9ab8eb02eeeb3167855ff0ac0f381dad7e (diff) | |
download | FreeBSD-src-6633bf70ed24c304037f64ca2f28e6ea8d2a0b47.zip FreeBSD-src-6633bf70ed24c304037f64ca2f28e6ea8d2a0b47.tar.gz |
Update dialog to 1.2-20130923.
Approved by: re (marius)
Diffstat (limited to 'contrib/dialog/checklist.c')
-rw-r--r-- | contrib/dialog/checklist.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/contrib/dialog/checklist.c b/contrib/dialog/checklist.c index 0ae18a6..1bb54db 100644 --- a/contrib/dialog/checklist.c +++ b/contrib/dialog/checklist.c @@ -1,5 +1,5 @@ /* - * $Id: checklist.c,v 1.151 2013/03/23 10:51:48 tom Exp $ + * $Id: checklist.c,v 1.153 2013/09/02 17:01:02 tom Exp $ * * checklist.c -- implements the checklist box * @@ -607,6 +607,7 @@ dialog_checklist(const char *title, && (dialog_vars.separate_output)); bool show_status = FALSE; int current = 0; + char *help_result; listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1); assert_ptr(listitems, "dialog_checklist"); @@ -640,31 +641,16 @@ dialog_checklist(const char *title, show_status = TRUE; break; case DLG_EXIT_HELP: - dlg_add_result("HELP "); - show_status = dialog_vars.help_status; - if (USE_ITEM_HELP(listitems[current].help)) { - if (show_status) { - if (separate_output) { - dlg_add_string(listitems[current].help); - dlg_add_separator(); - } else { - dlg_add_quoted(listitems[current].help); - } + dlg_add_help_listitem(&result, &help_result, &listitems[current]); + if ((show_status = dialog_vars.help_status)) { + if (separate_output) { + dlg_add_string(help_result); + dlg_add_separator(); } else { - dlg_add_string(listitems[current].help); + dlg_add_quoted(help_result); } - result = DLG_EXIT_ITEM_HELP; } else { - if (show_status) { - if (separate_output) { - dlg_add_string(listitems[current].name); - dlg_add_separator(); - } else { - dlg_add_quoted(listitems[current].name); - } - } else { - dlg_add_string(listitems[current].name); - } + dlg_add_string(help_result); } break; } |