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; return;
} }
static bool messageBoxAlreadyShown = false;
if (!messageBoxAlreadyShown) {
messageBoxAlreadyShown = true;
QMessageBox::StandardButton fingerprintReply = QMessageBox::StandardButton fingerprintReply =
QMessageBox::information( QMessageBox::information(
this, tr("Security question"), this, tr("Security question"),
@ -451,6 +455,8 @@ void MainWindow::checkFingerprint(const QString& line)
.arg(fingerprint), .arg(fingerprint),
QMessageBox::Yes | QMessageBox::No); QMessageBox::Yes | QMessageBox::No);
messageBoxAlreadyShown = false;
stopSynergy(); stopSynergy();
if (fingerprintReply == QMessageBox::Yes) { if (fingerprintReply == QMessageBox::Yes) {
@ -459,6 +465,7 @@ void MainWindow::checkFingerprint(const QString& line)
startSynergy(); startSynergy();
} }
} }
}
bool MainWindow::autoHide() bool MainWindow::autoHide()
{ {