From ae90d0f09edb5b9b15c0c75f6b43932c18c80b75 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Mon, 18 Sep 2017 18:34:54 +0200 Subject: [PATCH] Align HD wallet status icon code with Bitcoin code Rename labelEncryptionIcon to labelWalletEncryptionIcon Reorder icons in Makefile.qt.include Add missing entries in debian/copyright --- contrib/debian/copyright | 4 ++++ src/Makefile.qt.include | 6 +++--- src/qt/bitcoingui.cpp | 26 +++++++++++++------------- src/qt/bitcoingui.h | 2 +- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/contrib/debian/copyright b/contrib/debian/copyright index 517a884ac..2cd065cb4 100644 --- a/contrib/debian/copyright +++ b/contrib/debian/copyright @@ -62,6 +62,10 @@ Files: src/qt/res/icons/tx_mined.png src/qt/res/src/mine.svg src/qt/res/icons/fontbigger.png src/qt/res/icons/fontsmaller.png + src/qt/res/icons/*/hd_disabled.png + src/qt/res/src/hd_disabled.svg + src/qt/res/icons/*/hd_enabled.png + src/qt/res/src/hd_enabled.svg Copyright: Jonas Schnelli License: Expat Comment: diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index be3bef111..e47514b93 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -215,6 +215,7 @@ RES_ICONS = \ qt/res/icons/drkblue/synced.png \ qt/res/icons/drkblue/transaction0.png \ qt/res/icons/drkblue/transaction2.png \ + qt/res/icons/drkblue/transaction_abandoned.png \ qt/res/icons/drkblue/transaction_conflicted.png \ qt/res/icons/drkblue/tx_inout.png \ qt/res/icons/drkblue/tx_input.png \ @@ -225,7 +226,6 @@ RES_ICONS = \ qt/res/icons/drkblue/verify.png \ qt/res/icons/drkblue/fontbigger.png \ qt/res/icons/drkblue/fontsmaller.png \ - qt/res/icons/drkblue/transaction_abandoned.png \ qt/res/icons/drkblue/network_disabled.png \ qt/res/icons/crownium/add.png \ qt/res/icons/crownium/address-book.png \ @@ -269,6 +269,7 @@ RES_ICONS = \ qt/res/icons/crownium/synced.png \ qt/res/icons/crownium/transaction0.png \ qt/res/icons/crownium/transaction2.png \ + qt/res/icons/crownium/transaction_abandoned.png \ qt/res/icons/crownium/transaction_conflicted.png \ qt/res/icons/crownium/tx_inout.png \ qt/res/icons/crownium/tx_input.png \ @@ -279,7 +280,6 @@ RES_ICONS = \ qt/res/icons/crownium/verify.png \ qt/res/icons/crownium/fontbigger.png \ qt/res/icons/crownium/fontsmaller.png \ - qt/res/icons/crownium/transaction_abandoned.png \ qt/res/icons/crownium/network_disabled.png \ qt/res/icons/light/add.png \ qt/res/icons/light/address-book.png \ @@ -377,6 +377,7 @@ RES_ICONS = \ qt/res/icons/trad/synced.png \ qt/res/icons/trad/transaction0.png \ qt/res/icons/trad/transaction2.png \ + qt/res/icons/trad/transaction_abandoned.png \ qt/res/icons/trad/transaction_conflicted.png \ qt/res/icons/trad/tx_inout.png \ qt/res/icons/trad/tx_input.png \ @@ -387,7 +388,6 @@ RES_ICONS = \ qt/res/icons/trad/verify.png \ qt/res/icons/trad/fontbigger.png \ qt/res/icons/trad/fontsmaller.png \ - qt/res/icons/trad/transaction_abandoned.png \ qt/res/icons/trad/network_disabled.png BITCOIN_QT_CPP = \ diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 7fa776f3c..cc5d2ed38 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -84,7 +84,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n clientModel(0), walletFrame(0), unitDisplayControl(0), - labelEncryptionIcon(0), + labelWalletEncryptionIcon(0), labelWalletHDStatusIcon(0), labelConnectionsIcon(0), labelBlocksIcon(0), @@ -207,7 +207,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n frameBlocksLayout->setContentsMargins(3,0,3,0); frameBlocksLayout->setSpacing(3); unitDisplayControl = new UnitDisplayStatusBarControl(platformStyle); - labelEncryptionIcon = new QLabel(); + labelWalletEncryptionIcon = new QLabel(); labelWalletHDStatusIcon = new QLabel(); labelConnectionsIcon = new GUIUtil::ClickableLabel(); @@ -217,7 +217,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *platformStyle, const NetworkStyle *n frameBlocksLayout->addStretch(); frameBlocksLayout->addWidget(unitDisplayControl); frameBlocksLayout->addStretch(); - frameBlocksLayout->addWidget(labelEncryptionIcon); + frameBlocksLayout->addWidget(labelWalletEncryptionIcon); frameBlocksLayout->addWidget(labelWalletHDStatusIcon); } frameBlocksLayout->addStretch(); @@ -1308,7 +1308,7 @@ void BitcoinGUI::setEncryptionStatus(int status) switch(status) { case WalletModel::Unencrypted: - labelEncryptionIcon->hide(); + labelWalletEncryptionIcon->hide(); encryptWalletAction->setChecked(false); changePassphraseAction->setEnabled(false); unlockWalletAction->setVisible(false); @@ -1316,9 +1316,9 @@ void BitcoinGUI::setEncryptionStatus(int status) encryptWalletAction->setEnabled(true); break; case WalletModel::Unlocked: - labelEncryptionIcon->show(); - labelEncryptionIcon->setPixmap(QIcon(":/icons/" + theme + "/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); - labelEncryptionIcon->setToolTip(tr("Wallet is encrypted and currently unlocked")); + labelWalletEncryptionIcon->show(); + labelWalletEncryptionIcon->setPixmap(QIcon(":/icons/" + theme + "/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); + labelWalletEncryptionIcon->setToolTip(tr("Wallet is encrypted and currently unlocked")); encryptWalletAction->setChecked(true); changePassphraseAction->setEnabled(true); unlockWalletAction->setVisible(false); @@ -1326,9 +1326,9 @@ void BitcoinGUI::setEncryptionStatus(int status) encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported break; case WalletModel::UnlockedForMixingOnly: - labelEncryptionIcon->show(); - labelEncryptionIcon->setPixmap(QIcon(":/icons/" + theme + "/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); - labelEncryptionIcon->setToolTip(tr("Wallet is encrypted and currently unlocked for mixing only")); + labelWalletEncryptionIcon->show(); + labelWalletEncryptionIcon->setPixmap(QIcon(":/icons/" + theme + "/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); + labelWalletEncryptionIcon->setToolTip(tr("Wallet is encrypted and currently unlocked for mixing only")); encryptWalletAction->setChecked(true); changePassphraseAction->setEnabled(true); unlockWalletAction->setVisible(true); @@ -1336,9 +1336,9 @@ void BitcoinGUI::setEncryptionStatus(int status) encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported break; case WalletModel::Locked: - labelEncryptionIcon->show(); - labelEncryptionIcon->setPixmap(QIcon(":/icons/" + theme + "/lock_closed").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); - labelEncryptionIcon->setToolTip(tr("Wallet is encrypted and currently locked")); + labelWalletEncryptionIcon->show(); + labelWalletEncryptionIcon->setPixmap(QIcon(":/icons/" + theme + "/lock_closed").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); + labelWalletEncryptionIcon->setToolTip(tr("Wallet is encrypted and currently locked")); encryptWalletAction->setChecked(true); changePassphraseAction->setEnabled(true); unlockWalletAction->setVisible(true); diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index e77fd8ae6..e03648b95 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -85,7 +85,7 @@ private: WalletFrame *walletFrame; UnitDisplayStatusBarControl *unitDisplayControl; - QLabel *labelEncryptionIcon; + QLabel *labelWalletEncryptionIcon; QLabel *labelWalletHDStatusIcon; QLabel *labelConnectionsIcon; QLabel *labelBlocksIcon;