|
|
@ -35,6 +35,8 @@ WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *p |
|
|
|
cachedEncryptionStatus(Unencrypted), |
|
|
|
cachedEncryptionStatus(Unencrypted), |
|
|
|
cachedNumBlocks(0) |
|
|
|
cachedNumBlocks(0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
fProcessingQueuedTransactions = false; |
|
|
|
|
|
|
|
|
|
|
|
addressTableModel = new AddressTableModel(wallet, this); |
|
|
|
addressTableModel = new AddressTableModel(wallet, this); |
|
|
|
transactionTableModel = new TransactionTableModel(wallet, this); |
|
|
|
transactionTableModel = new TransactionTableModel(wallet, this); |
|
|
|
recentRequestsTableModel = new RecentRequestsTableModel(wallet, this); |
|
|
|
recentRequestsTableModel = new RecentRequestsTableModel(wallet, this); |
|
|
@ -492,8 +494,15 @@ static void ShowProgress(WalletModel *walletmodel, const std::string &title, int |
|
|
|
if (nProgress == 100) |
|
|
|
if (nProgress == 100) |
|
|
|
{ |
|
|
|
{ |
|
|
|
fQueueNotifications = false; |
|
|
|
fQueueNotifications = false; |
|
|
|
BOOST_FOREACH(const PAIRTYPE(uint256, ChangeType)& notification, vQueueNotifications) |
|
|
|
if (vQueueNotifications.size() > 10) // prevent balloon spam, show maximum 10 balloons
|
|
|
|
NotifyTransactionChanged(walletmodel, NULL, notification.first, notification.second); |
|
|
|
QMetaObject::invokeMethod(walletmodel, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, true)); |
|
|
|
|
|
|
|
for (unsigned int i = 0; i < vQueueNotifications.size(); ++i) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (vQueueNotifications.size() - i <= 10) |
|
|
|
|
|
|
|
QMetaObject::invokeMethod(walletmodel, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, false)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NotifyTransactionChanged(walletmodel, NULL, vQueueNotifications[i].first, vQueueNotifications[i].second); |
|
|
|
|
|
|
|
} |
|
|
|
std::vector<std::pair<uint256, ChangeType> >().swap(vQueueNotifications); // clear
|
|
|
|
std::vector<std::pair<uint256, ChangeType> >().swap(vQueueNotifications); // clear
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|