mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-12 05:34:57 +01:00
qt: mask values on transactions view
This commit is contained in:
@@ -456,6 +456,7 @@ void BitcoinGUI::createActions()
|
||||
m_wallet_controller->closeAllWallets(this);
|
||||
});
|
||||
connect(m_mask_values_action, &QAction::toggled, this, &BitcoinGUI::setPrivacy);
|
||||
connect(m_mask_values_action, &QAction::toggled, this, &BitcoinGUI::enableHistoryAction);
|
||||
}
|
||||
#endif // ENABLE_WALLET
|
||||
|
||||
@@ -668,6 +669,12 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH
|
||||
}
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
void BitcoinGUI::enableHistoryAction(bool privacy)
|
||||
{
|
||||
historyAction->setEnabled(!privacy);
|
||||
if (historyAction->isChecked()) gotoOverviewPage();
|
||||
}
|
||||
|
||||
void BitcoinGUI::setWalletController(WalletController* wallet_controller)
|
||||
{
|
||||
assert(!m_wallet_controller);
|
||||
@@ -716,7 +723,9 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
|
||||
connect(wallet_view, &WalletView::encryptionStatusChanged, this, &BitcoinGUI::updateWalletStatus);
|
||||
connect(wallet_view, &WalletView::incomingTransaction, this, &BitcoinGUI::incomingTransaction);
|
||||
connect(this, &BitcoinGUI::setPrivacy, wallet_view, &WalletView::setPrivacy);
|
||||
wallet_view->setPrivacy(isPrivacyModeActivated());
|
||||
const bool privacy = isPrivacyModeActivated();
|
||||
wallet_view->setPrivacy(privacy);
|
||||
enableHistoryAction(privacy);
|
||||
const QString display_name = walletModel->getDisplayName();
|
||||
m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user