|
|
@ -443,8 +443,8 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) |
|
|
|
setNumConnections(clientModel->getNumConnections()); |
|
|
|
setNumConnections(clientModel->getNumConnections()); |
|
|
|
connect(clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int))); |
|
|
|
connect(clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int))); |
|
|
|
|
|
|
|
|
|
|
|
setNumBlocks(clientModel->getNumBlocks(), clientModel->getLastBlockDate()); |
|
|
|
setNumBlocks(clientModel->getNumBlocks(), clientModel->getLastBlockDate(), NULL); |
|
|
|
connect(clientModel, SIGNAL(numBlocksChanged(int,QDateTime)), this, SLOT(setNumBlocks(int,QDateTime))); |
|
|
|
connect(clientModel, SIGNAL(numBlocksChanged(int,QDateTime,const CBlockIndex*)), this, SLOT(setNumBlocks(int,QDateTime,const CBlockIndex*))); |
|
|
|
|
|
|
|
|
|
|
|
// Receive and report messages from client model
|
|
|
|
// Receive and report messages from client model
|
|
|
|
connect(clientModel, SIGNAL(message(QString,QString,unsigned int)), this, SLOT(message(QString,QString,unsigned int))); |
|
|
|
connect(clientModel, SIGNAL(message(QString,QString,unsigned int)), this, SLOT(message(QString,QString,unsigned int))); |
|
|
@ -672,7 +672,7 @@ void BitcoinGUI::setNumConnections(int count) |
|
|
|
labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Bitcoin network", "", count)); |
|
|
|
labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Bitcoin network", "", count)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate) |
|
|
|
void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, const CBlockIndex *tip) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if(!clientModel) |
|
|
|
if(!clientModel) |
|
|
|
return; |
|
|
|
return; |
|
|
@ -749,7 +749,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate) |
|
|
|
progressBarLabel->setVisible(true); |
|
|
|
progressBarLabel->setVisible(true); |
|
|
|
progressBar->setFormat(tr("%1 behind").arg(timeBehindText)); |
|
|
|
progressBar->setFormat(tr("%1 behind").arg(timeBehindText)); |
|
|
|
progressBar->setMaximum(1000000000); |
|
|
|
progressBar->setMaximum(1000000000); |
|
|
|
progressBar->setValue(clientModel->getVerificationProgress() * 1000000000.0 + 0.5); |
|
|
|
progressBar->setValue(clientModel->getVerificationProgress(tip) * 1000000000.0 + 0.5); |
|
|
|
progressBar->setVisible(true); |
|
|
|
progressBar->setVisible(true); |
|
|
|
|
|
|
|
|
|
|
|
tooltip = tr("Catching up...") + QString("<br>") + tooltip; |
|
|
|
tooltip = tr("Catching up...") + QString("<br>") + tooltip; |
|
|
|