- if (QFile::exists(m_state.storePath + QStringLiteral("/.gpg-id"))) {
return Done;
- } else {
- return KeySelect;
}
- case KeySelect:
+ case KeyGen:
return Done;
default:
return -1;
}
return -1;
};
IntroPage::IntroPage(DialogState &s)
: m_state(s)
{
QVBoxLayout *lay = new QVBoxLayout();
lay->addWidget(new QLabel(i18n("Welcome to GnuPG Password manager")));
setTitle(i18n("Welcome"));
setSubTitle(i18n("Setting up"));
setLayout(lay);
}
KeyGenPage::KeyGenPage(DialogState &s)
: m_state(s)
{
setTitle(i18n("Generate keys"));
setSubTitle(i18n("Generate keys"));
m_ui = std::make_unique<Ui_KeyGenWidget>();
m_ui->setupUi(this);
m_ui->spinner->hide();
m_ui->generateButton->setEnabled(false);
m_ui->message->hide();
m_ui->email->setValidator(
new QRegularExpressionValidator(QRegularExpression(QRegularExpression::anchoredPattern(QStringLiteral(R"(\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b)")),
* @brief MainWindow::initStatusBar init statusBar with default message and logo
*/
void MainWindow::initStatusBar()
{
ui->statusBar->showMessage(i18nc("placeholder is version number","Welcome to GnuPG Password Manager %1", QString::fromLocal8Bit(GPGPASS_VERSION_STRING)));
QPixmap logo = QPixmap(QStringLiteral(":/artwork/32-gpgpass.png"));