mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-09 12:12:41 +01:00
Remove most direct bitcoin calls from qt/walletmodel.cpp
This commit is contained in:
committed by
John Newbery
parent
90d4640b7e
commit
a0704a8996
@@ -231,13 +231,15 @@ void OverviewPage::setWalletModel(WalletModel *model)
|
||||
ui->listTransactions->setModelColumn(TransactionTableModel::ToAddress);
|
||||
|
||||
// Keep up to date with wallet
|
||||
setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance(),
|
||||
model->getWatchBalance(), model->getWatchUnconfirmedBalance(), model->getWatchImmatureBalance());
|
||||
interface::Wallet& wallet = model->wallet();
|
||||
interface::WalletBalances balances = wallet.getBalances();
|
||||
setBalance(balances.balance, balances.unconfirmed_balance, balances.immature_balance,
|
||||
balances.watch_only_balance, balances.unconfirmed_watch_only_balance, balances.immature_watch_only_balance);
|
||||
connect(model, SIGNAL(balanceChanged(CAmount,CAmount,CAmount,CAmount,CAmount,CAmount)), this, SLOT(setBalance(CAmount,CAmount,CAmount,CAmount,CAmount,CAmount)));
|
||||
|
||||
connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
|
||||
|
||||
updateWatchOnlyLabels(model->haveWatchOnly());
|
||||
updateWatchOnlyLabels(wallet.haveWatchOnly());
|
||||
connect(model, SIGNAL(notifyWatchonlyChanged(bool)), this, SLOT(updateWatchOnlyLabels(bool)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user