Rework return value of closing dialogs

Yes no or cancel should work now.