Changeset View
Changeset View
Standalone View
Standalone View
src/qt/askpassphrasedialog.cpp
Show All 33 Lines | AskPassphraseDialog::AskPassphraseDialog(Mode _mode, QWidget *parent, | ||||
// Setup Caps Lock detection. | // Setup Caps Lock detection. | ||||
ui->passEdit1->installEventFilter(this); | ui->passEdit1->installEventFilter(this); | ||||
ui->passEdit2->installEventFilter(this); | ui->passEdit2->installEventFilter(this); | ||||
ui->passEdit3->installEventFilter(this); | ui->passEdit3->installEventFilter(this); | ||||
switch (mode) { | switch (mode) { | ||||
case Encrypt: // Ask passphrase x2 | case Encrypt: // Ask passphrase x2 | ||||
ui->warningLabel->setText( | ui->warningLabel->setText( | ||||
tr("Enter the new passphrase to the wallet.<br/>Please use a " | tr("Enter the new passphrase for the wallet.<br/>Please use a " | ||||
"passphrase of <b>ten or more random characters</b>, or " | "passphrase of <b>ten or more random characters</b>, or " | ||||
"<b>eight or more words</b>.")); | "<b>eight or more words</b>.")); | ||||
ui->passLabel1->hide(); | ui->passLabel1->hide(); | ||||
ui->passEdit1->hide(); | ui->passEdit1->hide(); | ||||
setWindowTitle(tr("Encrypt wallet")); | setWindowTitle(tr("Encrypt wallet")); | ||||
break; | break; | ||||
case Unlock: // Ask passphrase | case Unlock: // Ask passphrase | ||||
ui->warningLabel->setText(tr("This operation needs your wallet " | ui->warningLabel->setText(tr("This operation needs your wallet " | ||||
Show All 11 Lines | switch (mode) { | ||||
ui->passEdit2->hide(); | ui->passEdit2->hide(); | ||||
ui->passLabel3->hide(); | ui->passLabel3->hide(); | ||||
ui->passEdit3->hide(); | ui->passEdit3->hide(); | ||||
setWindowTitle(tr("Decrypt wallet")); | setWindowTitle(tr("Decrypt wallet")); | ||||
break; | break; | ||||
case ChangePass: // Ask old passphrase + new passphrase x2 | case ChangePass: // Ask old passphrase + new passphrase x2 | ||||
setWindowTitle(tr("Change passphrase")); | setWindowTitle(tr("Change passphrase")); | ||||
ui->warningLabel->setText(tr( | ui->warningLabel->setText(tr( | ||||
"Enter the old passphrase and new passphrase to the wallet.")); | "Enter the old passphrase and new passphrase for the wallet.")); | ||||
break; | break; | ||||
} | } | ||||
textChanged(); | textChanged(); | ||||
connect(ui->toggleShowPasswordButton, &QPushButton::toggled, this, | connect(ui->toggleShowPasswordButton, &QPushButton::toggled, this, | ||||
&AskPassphraseDialog::toggleShowPassword); | &AskPassphraseDialog::toggleShowPassword); | ||||
connect(ui->passEdit1, &QLineEdit::textChanged, this, | connect(ui->passEdit1, &QLineEdit::textChanged, this, | ||||
&AskPassphraseDialog::textChanged); | &AskPassphraseDialog::textChanged); | ||||
connect(ui->passEdit2, &QLineEdit::textChanged, this, | connect(ui->passEdit2, &QLineEdit::textChanged, this, | ||||
▲ Show 20 Lines • Show All 220 Lines • Show Last 20 Lines |