change mainwindow to dialog