aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-07-17 14:06:43 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-07-17 14:17:13 +0200
commit5df0b03c950184b2e2fdbfc6e9f8075dcf81c75c (patch)
tree889d52734e8e4a0a096289d52d03aa02d66f8292 /src/qt/bitcoingui.cpp
parentb5f918cbd69e02f1e955fe90a13444a15a7de43f (diff)
make initial block download reporting somewhat better by tracking version responses
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 016f261941..6a6f3f32ec 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -292,17 +292,21 @@ void BitcoinGUI::setNumConnections(int count)
void BitcoinGUI::setNumBlocks(int count)
{
int total = clientModel->getTotalBlocksEstimate();
+ QString tooltip;
+
if(count < total)
{
progressBarLabel->setVisible(true);
progressBar->setVisible(true);
progressBar->setMaximum(total);
progressBar->setValue(count);
+ tooltip = tr("Downloaded %1 of %2 blocks of transaction history.").arg(count).arg(total);
}
else
{
progressBarLabel->setVisible(false);
progressBar->setVisible(false);
+ tooltip = tr("Downloaded %1 blocks of transaction history.").arg(count);
}
QDateTime now = QDateTime::currentDateTime();
@@ -329,10 +333,13 @@ void BitcoinGUI::setNumBlocks(int count)
{
text = tr("%n day(s) ago","",secs/(60*60*24));
}
+ tooltip += QString("\n");
+ tooltip += tr("Last block was generated %1.").arg(QLocale::system().toString(lastBlockDate));
labelBlocks->setText("<img src=\""+icon+"\"> " + text);
- labelBlocks->setToolTip(tr("Downloaded %n block(s) of transaction history. Last block was generated %1.", "", count)
- .arg(QLocale::system().toString(lastBlockDate)));
+ labelBlocks->setToolTip(tooltip);
+ progressBarLabel->setToolTip(tooltip);
+ progressBar->setToolTip(tooltip);
}
void BitcoinGUI::error(const QString &title, const QString &message)