From: Miroslav Lichvar Date: Wed, 23 Mar 2016 11:05:52 +0000 (+0100) Subject: support --notags in whiptail checklist and radiolist (#1319794) X-Git-Tag: r0-52-19~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52b75483bc16e34336464c8fc3ff2b80ecafcda4;p=thirdparty%2Fnewt.git support --notags in whiptail checklist and radiolist (#1319794) The whiptail man page says the option is supported in the menu, checklist and radiolist widgets, but it actually worked only in menu. --- diff --git a/dialogboxes.c b/dialogboxes.c index 3885068..d790210 100644 --- a/dialogboxes.c +++ b/dialogboxes.c @@ -460,7 +460,11 @@ int checkList(const char * text, int height, int width, poptContext optCon, subform = newtForm(sb, NULL, 0); newtFormSetBackground(subform, NEWT_COLORSET_CHECKBOX); - snprintf(format, MAXFORMAT, "%%-%ds %%s", maxWidth); + if (flags & FLAG_NOTAGS) + snprintf(format, MAXFORMAT, "%%.0s%%s"); + else + snprintf(format, MAXFORMAT, "%%-%ds %%s", maxWidth); + for (i = 0; i < numBoxes; i++) { snprintf(buf, MAXBUF, format, cbInfo[i].tag, cbInfo[i].text);