From 78b3bf56f7804f3eb1b7cf8b189c5d567be7ca60 Mon Sep 17 00:00:00 2001 From: Janne Pulkkinen Date: Sat, 10 Sep 2011 12:43:45 +0300 Subject: The synchronization progress bar now compares the amount of total blocks to amount of blocks downloaded at application start-up. Could be probably implemented better. --- src/qt/bitcoingui.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/qt/bitcoingui.cpp') diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 0c9f778ff6..7943684eef 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -345,6 +345,7 @@ void BitcoinGUI::setNumConnections(int count) void BitcoinGUI::setNumBlocks(int count) { + int initTotal = clientModel->getNumBlocksAtStartup(); int total = clientModel->getTotalBlocksEstimate(); QString tooltip; @@ -352,8 +353,8 @@ void BitcoinGUI::setNumBlocks(int count) { progressBarLabel->setVisible(true); progressBar->setVisible(true); - progressBar->setMaximum(total); - progressBar->setValue(count); + progressBar->setMaximum(total - initTotal); + progressBar->setValue(count - initTotal); tooltip = tr("Downloaded %1 of %2 blocks of transaction history.").arg(count).arg(total); } else -- cgit v1.2.3