Dialog windows open conditionally

@winhamwr Thanks. Removed the hyphen. Other things seem to not mind.