init setting before main window show