Use a dialog instead of creating a new window