Skip to content

Commit 5faf433

Browse files
author
limxdev
committed
Add gui function for lock wallet
1 parent 923ffb3 commit 5faf433

3 files changed

Lines changed: 12 additions & 15 deletions

File tree

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
33
define(_CLIENT_VERSION_MAJOR, 0)
44
define(_CLIENT_VERSION_MINOR, 90)
55
define(_CLIENT_VERSION_REVISION, 8)
6-
define(_CLIENT_VERSION_BUILD, 8)
6+
define(_CLIENT_VERSION_BUILD, 9)
77
define(_CLIENT_VERSION_IS_RELEASE, true)
88
define(_COPYRIGHT_YEAR, 2020)
99
define(_COPYRIGHT_HOLDERS,[The %s developers])

src/qt/bitcoingui.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -354,18 +354,12 @@ void BitcoinGUI::createActions()
354354
backupWalletAction = new QAction(platformStyle->TextColorIcon(":/icons/filesave"), tr("&Backup Wallet..."), this);
355355
backupWalletAction->setStatusTip(tr("Backup wallet to another location"));
356356
changePassphraseAction = new QAction(platformStyle->TextColorIcon(":/icons/key"), tr("&Change Passphrase..."), this);
357-
//Bitcore BEGINN
358357
unlockWalletAction = new QAction(platformStyle->TextColorIcon(":/icons/lock_open"), tr("&Unlock Wallet..."), this);
359358
unlockWalletAction->setStatusTip(tr("Unlock encrypted wallet for firther transactions."));
360-
//Bitcore END
361359
changePassphraseAction->setStatusTip(tr("Change the passphrase used for wallet encryption"));
362-
363-
// Dash
364-
// FXTC TODO: menu items
365-
//-//unlockWalletAction = new QAction(tr("&Unlock Wallet..."), this);
366-
//-//unlockWalletAction->setToolTip(tr("Unlock wallet"));
367360
lockWalletAction = new QAction(tr("&Lock Wallet"), this);
368-
//
361+
lockWalletAction = new QAction(platformStyle->TextColorIcon(":/icons/lock_closed"), tr("&Lock Wallet..."), this);
362+
369363

370364
// Megacoin
371365
//unlockWalletAction = new QAction(platformStyle->TextColorIcon(":/icons/lock_open"), tr("&Unlock Wallet..."), this);
@@ -1436,10 +1430,12 @@ void BitcoinGUI::setEncryptionStatus(int status)
14361430
encryptWalletAction->setChecked(true);
14371431
changePassphraseAction->setEnabled(true);
14381432
unlockWalletAction->setEnabled(false);
1433+
unlockWalletAction->setVisible(false);
14391434
lockWalletAction->setVisible(true);
14401435
encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
14411436
break;
14421437
// Dash
1438+
/*
14431439
case WalletModel::UnlockedForMixingOnly:
14441440
labelWalletEncryptionIcon->show();
14451441
labelWalletEncryptionIcon->setPixmap(platformStyle->SingleColorIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
@@ -1454,14 +1450,15 @@ void BitcoinGUI::setEncryptionStatus(int status)
14541450
encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
14551451
break;
14561452
//
1453+
*/
14571454
case WalletModel::Locked:
14581455
labelWalletEncryptionIcon->show();
14591456
labelWalletEncryptionIcon->setPixmap(platformStyle->SingleColorIcon(":/icons/lock_closed").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
14601457
labelWalletEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>locked</b>"));
14611458
encryptWalletAction->setChecked(true);
14621459
changePassphraseAction->setEnabled(true);
14631460
unlockWalletAction->setVisible(true);
1464-
//unlockWalletAction->setEnabled(true);
1461+
unlockWalletAction->setEnabled(true);
14651462
lockWalletAction->setVisible(false);
14661463
encryptWalletAction->setEnabled(false);
14671464
encryptWalletAction->setVisible(false);

src/qt/walletview.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,12 +333,12 @@ void WalletView::unlockWallet(bool fForMixingOnly)
333333
return;
334334
// Unlock wallet when requested by wallet model
335335
// Dash
336-
//if (walletModel->getEncryptionStatus() == WalletModel::Locked)
337-
if (walletModel->getEncryptionStatus() == WalletModel::Locked || walletModel->getEncryptionStatus() == WalletModel::UnlockedForMixingOnly)
336+
//if (walletModel->getEncryptionStatus() == WalletModel::Locked || walletModel->getEncryptionStatus() == WalletModel::UnlockedForMixingOnly)
337+
if (walletModel->getEncryptionStatus() == WalletModel::Locked)
338338
{
339-
//AskPassphraseDialog dlg(AskPassphraseDialog::Unlock, this);
340-
AskPassphraseDialog dlg(fForMixingOnly ? AskPassphraseDialog::UnlockMixing : AskPassphraseDialog::Unlock, this);
341-
//
339+
AskPassphraseDialog dlg(AskPassphraseDialog::Unlock, this);
340+
//AskPassphraseDialog dlg(fForMixingOnly ? AskPassphraseDialog::UnlockMixing : AskPassphraseDialog::Unlock, this);
341+
342342
dlg.setModel(walletModel);
343343
dlg.exec();
344344
}

0 commit comments

Comments
 (0)