mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-09 13:15:33 +08:00
Showed auto connect prompt after main window
This commit is contained in:
@@ -112,10 +112,6 @@ MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig) :
|
||||
setMinimumSize(size());
|
||||
#endif
|
||||
|
||||
if (!appConfig.autoConnectPrompted()) {
|
||||
promptAutoConnect();
|
||||
}
|
||||
|
||||
m_pCheckBoxAutoConnect->setChecked(appConfig.autoConnect());
|
||||
|
||||
m_pComboServerList->hide();
|
||||
@@ -144,6 +140,10 @@ void MainWindow::open()
|
||||
|
||||
m_VersionChecker.checkLatest();
|
||||
|
||||
if (!appConfig().autoConnectPrompted()) {
|
||||
promptAutoConnect();
|
||||
}
|
||||
|
||||
// only start if user has previously started. this stops the gui from
|
||||
// auto hiding before the user has configured synergy (which of course
|
||||
// confuses first time users, who think synergy has crashed).
|
||||
@@ -1083,9 +1083,11 @@ void MainWindow::promptAutoConnect()
|
||||
|
||||
if (r == QMessageBox::Yes) {
|
||||
m_AppConfig.setAutoConnect(true);
|
||||
m_pCheckBoxAutoConnect->setChecked(true);
|
||||
}
|
||||
else {
|
||||
m_AppConfig.setAutoConnect(false);
|
||||
m_pCheckBoxAutoConnect->setChecked(false);
|
||||
}
|
||||
|
||||
m_AppConfig.setAutoConnectPrompted(true);
|
||||
|
||||
Reference in New Issue
Block a user