diff options
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/bitcoingui.cpp | 3 | ||||
-rw-r--r-- | src/qt/forms/signverifymessagedialog.ui | 2 | ||||
-rw-r--r-- | src/qt/walletmodel.cpp | 25 |
3 files changed, 14 insertions, 16 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 878c2887a2..7b0e6f3bc0 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -344,6 +344,7 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) this->clientModel = clientModel; if(clientModel) { + // Replace some strings and icons, when using the testnet if(clientModel->isTestNet()) { setWindowTitle(windowTitle() + QString(" ") + tr("[testnet]")); @@ -359,6 +360,8 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) trayIcon->setIcon(QIcon(":/icons/toolbar_testnet")); toggleHideAction->setIcon(QIcon(":/icons/toolbar_testnet")); } + + aboutAction->setIcon(QIcon(":/icons/toolbar_testnet")); } // Keep up to date with client diff --git a/src/qt/forms/signverifymessagedialog.ui b/src/qt/forms/signverifymessagedialog.ui index e22aea8675..8128bdf457 100644 --- a/src/qt/forms/signverifymessagedialog.ui +++ b/src/qt/forms/signverifymessagedialog.ui @@ -11,7 +11,7 @@ </rect> </property> <property name="windowTitle"> - <string>Messaging - Sign / Verify a Message</string> + <string>Signatures - Sign / Verify a Message</string> </property> <property name="modal"> <bool>true</bool> diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 0111e0cd91..3568616cd3 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -23,13 +23,10 @@ WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *p addressTableModel = new AddressTableModel(wallet, this); transactionTableModel = new TransactionTableModel(wallet, this); - // This single-shot timer will be fired from the 'checkBalancedChanged' - // method repeatedly while either of the unconfirmed or immature balances - // are non-zero + // This timer will be fired repeatedly to update the balance pollTimer = new QTimer(this); - pollTimer->setInterval(MODEL_UPDATE_DELAY); - pollTimer->setSingleShot(true); connect(pollTimer, SIGNAL(timeout()), this, SLOT(pollBalanceChanged())); + pollTimer->start(MODEL_UPDATE_DELAY); subscribeToCoreSignals(); } @@ -74,13 +71,12 @@ void WalletModel::updateStatus() void WalletModel::pollBalanceChanged() { - if(nBestHeight != cachedNumBlocks) { + if(nBestHeight != cachedNumBlocks) + { + // Balance and number of transactions might have changed cachedNumBlocks = nBestHeight; checkBalanceChanged(); } - - if(cachedUnconfirmedBalance || cachedImmatureBalance) - pollTimer->start(); } void WalletModel::checkBalanceChanged() @@ -89,7 +85,8 @@ void WalletModel::checkBalanceChanged() qint64 newUnconfirmedBalance = getUnconfirmedBalance(); qint64 newImmatureBalance = getImmatureBalance(); - if(cachedBalance != newBalance || cachedUnconfirmedBalance != newUnconfirmedBalance || cachedImmatureBalance != newImmatureBalance) { + if(cachedBalance != newBalance || cachedUnconfirmedBalance != newUnconfirmedBalance || cachedImmatureBalance != newImmatureBalance) + { cachedBalance = newBalance; cachedUnconfirmedBalance = newUnconfirmedBalance; cachedImmatureBalance = newImmatureBalance; @@ -105,13 +102,11 @@ void WalletModel::updateTransaction(const QString &hash, int status) // Balance and number of transactions might have changed checkBalanceChanged(); - if(cachedUnconfirmedBalance || cachedImmatureBalance) - pollTimer->start(); - int newNumTransactions = getNumTransactions(); - if(cachedNumTransactions != newNumTransactions) { - emit numTransactionsChanged(newNumTransactions); + if(cachedNumTransactions != newNumTransactions) + { cachedNumTransactions = newNumTransactions; + emit numTransactionsChanged(newNumTransactions); } } |