Dialog windows open conditionally

And I'm a bit smarter.