Stopped multiple fingerprint message boxes popping up #4910

This commit is contained in:
Xinyu Hou 2015-07-30 16:51:00 -07:00 committed by Jerry (Xinyu Hou)
parent d70c19b099
commit 0612ba585d
1 changed files with 26 additions and 19 deletions

View File

@ -436,6 +436,10 @@ void MainWindow::checkFingerprint(const QString& line)
return;
}
static bool messageBoxAlreadyShown = false;
if (!messageBoxAlreadyShown) {
messageBoxAlreadyShown = true;
QMessageBox::StandardButton fingerprintReply =
QMessageBox::information(
this, tr("Security question"),
@ -451,6 +455,8 @@ void MainWindow::checkFingerprint(const QString& line)
.arg(fingerprint),
QMessageBox::Yes | QMessageBox::No);
messageBoxAlreadyShown = false;
stopSynergy();
if (fingerprintReply == QMessageBox::Yes) {
@ -458,6 +464,7 @@ void MainWindow::checkFingerprint(const QString& line)
Fingerprint::trustedServers().trust(fingerprint);
startSynergy();
}
}
}
bool MainWindow::autoHide()