diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2012-04-02 15:28:53 +0200 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2012-04-02 23:48:22 +0200 |
commit | 5519660a0d80bdbfeadfe8c68303c936048635d0 (patch) | |
tree | 6ae78b829179da781615f8dc328d08b906c78804 /src | |
parent | 068ed1e8384dd0e12ef68c0dc91c7064b6aae8ec (diff) |
changed progressbar text to "~n blocks remaining"
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/bitcoingui.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index c8294cfe3d..319a2f92ec 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -461,20 +461,23 @@ void BitcoinGUI::setNumBlocks(int count) } int nTotal = clientModel->getNumBlocksOfPeers(); - int nPercentageLeft = 100 - (count / (nTotal / 100)); QString tooltip; if(count < nTotal) { + int nCurMax = nTotal - count; + int nOnePercentCurMax = nCurMax / 100; + int nPercentageDone = (count / (nTotal / 100)); + if (clientModel->getStatusBarWarnings() == "") { progressBarLabel->setVisible(true); progressBarLabel->setText(tr("Synchronizing with network...")); progressBar->setVisible(true); - progressBar->setFormat(tr("%v of %m blocks (%p%)")); + progressBar->setFormat(tr("~%m blocks remaining")); progressBar->setAlignment(Qt::AlignCenter); - progressBar->setMaximum(nTotal); - progressBar->setValue(count); + progressBar->setMaximum(nCurMax); + progressBar->setValue(nOnePercentCurMax * nPercentageDone); } else { @@ -482,7 +485,7 @@ void BitcoinGUI::setNumBlocks(int count) progressBarLabel->setVisible(true); progressBar->setVisible(false); } - tooltip = tr("Downloaded %1 of %2 blocks of transaction history (%3% left).").arg(count).arg(nTotal).arg(nPercentageLeft); + tooltip = tr("Downloaded %1 of %2 blocks of transaction history (%3% done).").arg(count).arg(nTotal).arg(nPercentageDone); } else { |