diff options
Diffstat (limited to 'contrib/dialog/buildlist.c')
-rw-r--r-- | contrib/dialog/buildlist.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/contrib/dialog/buildlist.c b/contrib/dialog/buildlist.c index cb7c600..2c3e199 100644 --- a/contrib/dialog/buildlist.c +++ b/contrib/dialog/buildlist.c @@ -1,5 +1,5 @@ /* - * $Id: buildlist.c,v 1.57 2013/03/17 13:46:30 tom Exp $ + * $Id: buildlist.c,v 1.59 2013/09/02 17:01:02 tom Exp $ * * buildlist.c -- implements the buildlist dialog * @@ -1027,6 +1027,7 @@ dialog_buildlist(const char *title, bool separate_output = 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_buildlist"); @@ -1060,31 +1061,16 @@ dialog_buildlist(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; } |