Hide close button on YubiKey user interaction message

This commit is contained in:
Janek Bevendorff 2017-02-25 22:09:55 +01:00
parent 3230206b69
commit 3715286eba
No known key found for this signature in database
GPG Key ID: CFEC2F6850BFFA53
2 changed files with 7 additions and 5 deletions

View File

@ -862,13 +862,15 @@ bool MainWindow::isTrayIconEnabled() const
#endif
}
void MainWindow::displayGlobalMessage(const QString& text, MessageWidget::MessageType type)
void MainWindow::displayGlobalMessage(const QString& text, MessageWidget::MessageType type, bool showClosebutton)
{
m_ui->globalMessageWidget->setCloseButtonVisible(showClosebutton);
m_ui->globalMessageWidget->showMessage(text, type);
}
void MainWindow::displayTabMessage(const QString& text, MessageWidget::MessageType type)
void MainWindow::displayTabMessage(const QString& text, MessageWidget::MessageType type, bool showClosebutton)
{
m_ui->globalMessageWidget->setCloseButtonVisible(showClosebutton);
m_ui->tabWidget->currentDatabaseWidget()->showMessage(text, type);
}
@ -886,7 +888,7 @@ void MainWindow::hideTabMessage()
void MainWindow::showYubiKeyPopup()
{
displayGlobalMessage(tr("Please touch the button on your YubiKey!"), MessageWidget::Information);
displayGlobalMessage(tr("Please touch the button on your YubiKey!"), MessageWidget::Information, false);
setEnabled(false);
}

View File

@ -44,8 +44,8 @@ public Q_SLOTS:
void openDatabase(const QString& fileName, const QString& pw = QString(),
const QString& keyFile = QString());
void appExit();
void displayGlobalMessage(const QString& text, MessageWidget::MessageType type);
void displayTabMessage(const QString& text, MessageWidget::MessageType type);
void displayGlobalMessage(const QString& text, MessageWidget::MessageType type, bool showClosebutton = true);
void displayTabMessage(const QString& text, MessageWidget::MessageType type, bool showClosebutton = true);
void hideGlobalMessage();
void showYubiKeyPopup();
void hideYubiKeyPopup();