Showed auto connect prompt after main window

This commit is contained in:
Xinyu Hou 2014-11-25 15:21:30 +00:00
parent 2e744b0f02
commit d89cb46912
1 changed files with 6 additions and 4 deletions

View File

@ -112,10 +112,6 @@ MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig) :
setMinimumSize(size()); setMinimumSize(size());
#endif #endif
if (!appConfig.autoConnectPrompted()) {
promptAutoConnect();
}
m_pCheckBoxAutoConnect->setChecked(appConfig.autoConnect()); m_pCheckBoxAutoConnect->setChecked(appConfig.autoConnect());
m_pComboServerList->hide(); m_pComboServerList->hide();
@ -144,6 +140,10 @@ void MainWindow::open()
m_VersionChecker.checkLatest(); m_VersionChecker.checkLatest();
if (!appConfig().autoConnectPrompted()) {
promptAutoConnect();
}
// only start if user has previously started. this stops the gui from // only start if user has previously started. this stops the gui from
// auto hiding before the user has configured synergy (which of course // auto hiding before the user has configured synergy (which of course
// confuses first time users, who think synergy has crashed). // confuses first time users, who think synergy has crashed).
@ -1083,9 +1083,11 @@ void MainWindow::promptAutoConnect()
if (r == QMessageBox::Yes) { if (r == QMessageBox::Yes) {
m_AppConfig.setAutoConnect(true); m_AppConfig.setAutoConnect(true);
m_pCheckBoxAutoConnect->setChecked(true);
} }
else { else {
m_AppConfig.setAutoConnect(false); m_AppConfig.setAutoConnect(false);
m_pCheckBoxAutoConnect->setChecked(false);
} }
m_AppConfig.setAutoConnectPrompted(true); m_AppConfig.setAutoConnectPrompted(true);