Skip to content

Commit

Permalink
Partially merge dashpay#3604:
Browse files Browse the repository at this point in the history
- BitcoinGUI::updateWalletStatus()
- Make WalletFrame::currentWalletView public
  • Loading branch information
xdustinface committed Sep 12, 2020
1 parent 2bb94c7 commit 55fec55
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,20 @@ void BitcoinGUI::setEncryptionStatus(int status)
}
#endif // ENABLE_WALLET

void BitcoinGUI::updateWalletStatus()
{
if (!walletFrame) {
return
}
WalletView * const walletView = walletFrame->currentWalletView();
if (!walletView) {
return;
}
WalletModel * const walletModel = walletView->getWalletModel();
setEncryptionStatus(walletModel->getEncryptionStatus());
setHDStatus(walletModel->hdEnabled());
}

void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)
{
if(!clientModel)
Expand Down
3 changes: 3 additions & 0 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ class BitcoinGUI : public QMainWindow
*/
bool addWallet(const QString& name, WalletModel *walletModel);
bool setCurrentWallet(const QString& name);
/** Set the UI status indicators based on the currently selected wallet.
*/
void updateWalletStatus();
void removeAllWallets();
#endif // ENABLE_WALLET
bool enableWallet;
Expand Down
1 change: 1 addition & 0 deletions src/qt/walletframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class WalletFrame : public QFrame

bool bOutOfSync;

public:
WalletView *currentWalletView();

public Q_SLOTS:
Expand Down

0 comments on commit 55fec55

Please sign in to comment.