!!! pass dialog instance instead of dialog widget to the callback function (this is a breaking change)