Sorry to coming back after issue #22, after some test, I encounter new issue with checklist and radiolist.
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
Items are not displayed.
PS : I've tested all other options with success
<img alt="checklist.png" src="/newt/issue/raw/files/782ee6775af9434538d447c4ae06e0b4fe7a2cc2e707a2eb337db0d5c6b559e5-checklist.png" />
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)
@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.
to comment on this ticket.