From 8926c607bb6f803c67a7bde6392d90772b8c3be5 Mon Sep 17 00:00:00 2001 From: Cy Rossignol Date: Mon, 12 Apr 2021 12:18:05 -0500 Subject: [PATCH] Highlight GUI statusbar icon when fully-unlocked This causes the GUI to display a red, open padlock when the wallet is fully-unlocked (not for staking only) to remind a user to lock it. --- src/qt/bitcoingui.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 6a9a0a9026..e2cd95d6d0 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -1315,7 +1315,11 @@ void BitcoinGUI::setEncryptionStatus(int status) encryptWalletAction->setEnabled(true); break; case WalletModel::Unlocked: - labelEncryptionIcon->setPixmap(QIcon(":/icons/status_encryption_unlocked_" + sSheet).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); + if (fWalletUnlockStakingOnly) { + labelEncryptionIcon->setPixmap(QIcon(":/icons/status_encryption_unlocked_" + sSheet).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); + } else { + labelEncryptionIcon->setPixmap(QIcon(":/icons/status_encryption_none_" + sSheet).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); + } labelEncryptionIcon->setToolTip(tr("Wallet is encrypted and currently %1 ").arg(fWalletUnlockStakingOnly ? tr("unlocked for staking only") : tr("fully unlocked"))); encryptWalletAction->setChecked(true); changePassphraseAction->setEnabled(true);