Merge 774a4f517c into merged_master (Bitcoin PR bitcoin-core/gui#403)

This commit is contained in:
Byron Hambly 2023-04-11 07:36:25 +00:00
commit 85d315ee19
5 changed files with 7 additions and 20 deletions

View file

@ -113,6 +113,7 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
connect(walletFrame, &WalletFrame::message, [this](const QString& title, const QString& message, unsigned int style) {
this->message(title, message, style);
});
connect(walletFrame, &WalletFrame::currentWalletSet, [this] { updateWalletStatus(); });
setCentralWidget(walletFrame);
} else
#endif // ENABLE_WALLET
@ -689,7 +690,6 @@ void BitcoinGUI::addWallet(WalletModel* walletModel)
});
connect(wallet_view, &WalletView::encryptionStatusChanged, this, &BitcoinGUI::updateWalletStatus);
connect(wallet_view, &WalletView::incomingTransaction, this, &BitcoinGUI::incomingTransaction);
connect(wallet_view, &WalletView::hdEnabledStatusChanged, this, &BitcoinGUI::updateWalletStatus);
connect(this, &BitcoinGUI::setPrivacy, wallet_view, &WalletView::setPrivacy);
wallet_view->setPrivacy(isPrivacyModeActivated());
const QString display_name = walletModel->getDisplayName();
@ -1313,9 +1313,8 @@ void BitcoinGUI::setEncryptionStatus(int status)
void BitcoinGUI::updateWalletStatus()
{
if (!walletFrame) {
return;
}
assert(walletFrame);
WalletView * const walletView = walletFrame->currentWalletView();
if (!walletView) {
return;

View file

@ -109,7 +109,8 @@ void WalletFrame::setCurrentWallet(WalletModel* wallet_model)
walletView->updateGeometry();
walletStack->setCurrentWidget(walletView);
walletView->updateEncryptionStatus();
Q_EMIT currentWalletSet();
}
void WalletFrame::removeWallet(WalletModel* wallet_model)

View file

@ -49,6 +49,7 @@ public:
Q_SIGNALS:
void createWalletButtonClicked();
void message(const QString& title, const QString& message, unsigned int style);
void currentWalletSet();
private:
QStackedWidget *walletStack;

View file

@ -118,10 +118,6 @@ void WalletView::setWalletModel(WalletModel *_walletModel)
// Handle changes in encryption status
connect(_walletModel, &WalletModel::encryptionStatusChanged, this, &WalletView::encryptionStatusChanged);
updateEncryptionStatus();
// update HD status
Q_EMIT hdEnabledStatusChanged();
// Balloon pop-up for new transaction
connect(_walletModel->getTransactionTableModel(), &TransactionTableModel::rowsInserted, this, &WalletView::processNewTransaction);
@ -211,11 +207,6 @@ void WalletView::showOutOfSyncWarning(bool fShow)
overviewPage->showOutOfSyncWarning(fShow);
}
void WalletView::updateEncryptionStatus()
{
Q_EMIT encryptionStatusChanged();
}
void WalletView::encryptWallet()
{
if(!walletModel)
@ -224,7 +215,7 @@ void WalletView::encryptWallet()
dlg.setModel(walletModel);
dlg.exec();
updateEncryptionStatus();
Q_EMIT encryptionStatusChanged();
}
void WalletView::backupWallet()

View file

@ -103,9 +103,6 @@ public Q_SLOTS:
/** Show used receiving addresses */
void usedReceivingAddresses();
/** Re-emit encryption status signal */
void updateEncryptionStatus();
/** Show progress dialog e.g. for rescan */
void showProgress(const QString &title, int nProgress);
@ -117,8 +114,6 @@ Q_SIGNALS:
void message(const QString &title, const QString &message, unsigned int style);
/** Encryption status of wallet changed */
void encryptionStatusChanged();
/** HD-Enabled status of wallet changed (only possible during startup) */
void hdEnabledStatusChanged();
/** Notify that a new transaction appeared */
void incomingTransaction(const QString& date, const QString& assetamount_str, const QString& type, const QString& address, const QString& label, const QString& walletName);
/** Notify that the out of sync warning icon has been pressed */