X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fqt%2Faskpassphrasedialog.cpp;h=1ae43c12e3881816f24f9c717d0573a6130aa3e2;hp=31e4040d1d237dca49e3960759292332305039eb;hb=84a4a7763f386934da90e2bd1e355b70023fa9ca;hpb=9cc27ae536be74b221605119292e7ee67b520fe1 diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp index 31e4040..1ae43c1 100644 --- a/src/qt/askpassphrasedialog.cpp +++ b/src/qt/askpassphrasedialog.cpp @@ -24,7 +24,6 @@ AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) : ui->passEdit1->installEventFilter(this); ui->passEdit2->installEventFilter(this); ui->passEdit3->installEventFilter(this); - ui->capsLabel->clear(); switch(mode) { @@ -99,7 +98,7 @@ void AskPassphraseDialog::accept() break; } QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm wallet encryption"), - tr("WARNING: If you encrypt your wallet and lose your passphrase, you will LOSE ALL OF YOUR BITCOINS!\nAre you sure you wish to encrypt your wallet?"), + tr("Warning: If you encrypt your wallet and lose your passphrase, you will LOSE ALL OF YOUR COINS!") + "

" + tr("Are you sure you wish to encrypt your wallet?"), QMessageBox::Yes|QMessageBox::Cancel, QMessageBox::Cancel); if(retval == QMessageBox::Yes) @@ -109,7 +108,16 @@ void AskPassphraseDialog::accept() if(model->setWalletEncrypted(true, newpass1)) { QMessageBox::warning(this, tr("Wallet encrypted"), - tr("Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.")); + "" + + tr("NovaCoin will close now to finish the encryption process. " + "Remember that encrypting your wallet cannot fully protect " + "your coins from being stolen by malware infecting your computer.") + + "

" + + tr("IMPORTANT: Any previous backups you have made of your wallet file " + "should be replaced with the newly generated, encrypted wallet file. " + "For security reasons, previous backups of the unencrypted wallet file " + "will become useless as soon as you start using the new, encrypted wallet.") + + "
"); QApplication::quit(); } else @@ -158,7 +166,7 @@ void AskPassphraseDialog::accept() if(model->changePassphrase(oldpass, newpass1)) { QMessageBox::information(this, tr("Wallet encrypted"), - tr("Wallet passphrase was succesfully changed.")); + tr("Wallet passphrase was successfully changed.")); QDialog::accept(); // Success } else @@ -178,7 +186,7 @@ void AskPassphraseDialog::accept() void AskPassphraseDialog::textChanged() { - // Validate input, set Ok button to enabled when accepable + // Validate input, set Ok button to enabled when acceptable bool acceptable = false; switch(mode) { @@ -205,7 +213,7 @@ bool AskPassphraseDialog::event(QEvent *event) fCapsLock = !fCapsLock; } if (fCapsLock) { - ui->capsLabel->setText(tr("Warning: The Caps Lock key is on.")); + ui->capsLabel->setText(tr("Warning: The Caps Lock key is on!")); } else { ui->capsLabel->clear(); } @@ -213,9 +221,9 @@ bool AskPassphraseDialog::event(QEvent *event) return QWidget::event(event); } -bool AskPassphraseDialog::eventFilter(QObject *, QEvent *event) +bool AskPassphraseDialog::eventFilter(QObject *object, QEvent *event) { - /* Detect Caps Lock. + /* Detect Caps Lock. * There is no good OS-independent way to check a key state in Qt, but we * can detect Caps Lock by checking for the following condition: * Shift key is down and the result is a lower case character, or @@ -229,12 +237,12 @@ bool AskPassphraseDialog::eventFilter(QObject *, QEvent *event) bool fShift = (ke->modifiers() & Qt::ShiftModifier) != 0; if ((fShift && psz->isLower()) || (!fShift && psz->isUpper())) { fCapsLock = true; - ui->capsLabel->setText(tr("Warning: The Caps Lock key is on.")); + ui->capsLabel->setText(tr("Warning: The Caps Lock key is on!")); } else if (psz->isLetter()) { fCapsLock = false; ui->capsLabel->clear(); } } } - return false; + return QDialog::eventFilter(object, event); }