#23 whiptail checklist and radiolist is breacked after last update
Closed: Fixed 3 months ago by mlichvar. Opened 3 months ago by matmoul.

Sorry to coming back after issue #22, after some test, I encounter new issue with checklist and radiolist.

Samples :
whiptail --checklist "checklist" 0 0 0 "1" "Item 1" on "2" "Item 2" off "3" "Item 3" on
whiptail --radiolist "radiolist" 0 0 0 "1" "Item 1" on "2" "Item 2" off "3" "Item 3" on

Result :
Items are not displayed.

PS : I've tested all other options with success

Ok, now we know what that code was doing.

In your example the specified menu height (the third number) is 0. Previously, that value was replaced with a string containing a calculated number, which caused the crash when popt tried to free the string. The specified value is followed now, but it may break existing scripts that don't specify the height correctly.

Looking at what dialog is doing, it seems 0 is supposed to mean minimum height that shows all entries and positive values add space at the bottom. That doesn't match the original behavior of whiptail before the popt crash fix, so there will either be an incompatibility between dialog and whiptail, or a visible change for existing scripts using whiptail.

This should be now fixed in the latest code. Please test and I'll make a new release.

Metadata Update from @mlichvar:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 months ago

@mlichvar Thank for your work

I tested your latest changes with success.
And now it's even better than before, items are centered on the window.

I take this opportunity to point out a difference with dialog.
whiptail --yesno "YN" 0 0
dialog --yesno "YN" 0 0
Dialog scales the window width with content and buttons, while whiptail only scales with content width.
This was the previous behavior of whiptail and is not an issue.

This issue with --yesno buttons should be fixed now too.

Thanks for the great job.
Everything looks fine to me.

Login to comment on this ticket.

Attachments 1
Attached 3 months ago View Comment