aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2012-04-03 08:30:13 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2012-04-03 08:30:13 +0200
commitec9a4904f38c6c8b9a889e28bb7101dbc0eb5e97 (patch)
tree130eab2f40611a8c3855092919007d74c272d27d /src/qt/bitcoingui.cpp
parenta7a69cd07a97dddd7dd74b0b1a6b2f82fe750261 (diff)
changed percentage done in tooltip to float to be more precise / allowed plurals in translation for "x block(s) remaining"
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 2befcdf786..6d710acea8 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -148,7 +148,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
statusBar()->addWidget(progressBar);
statusBar()->addPermanentWidget(frameBlocks);
- // define OS independent progress bar style (has to be after addWidget(), otherwise we crash)
+ // define OS independent progress bar style (has to be placed after addWidget(), otherwise we crash)
progressBar->setStyleSheet("QProgressBar { background-color: transparent; border: 1px solid grey; border-radius: 2px; padding: 1px; text-align: center; } QProgressBar::chunk { background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #FF8000, stop: 1 orange); margin: 0px; }");
syncIconMovie = new QMovie(":/movies/update_spinner", "mng", this);
@@ -468,13 +468,13 @@ void BitcoinGUI::setNumBlocks(int count)
if(count < nTotalBlocks)
{
int nRemainingBlocks = nTotalBlocks - count;
- int nPercentageDone = (count / ((nTotalBlocks / 100) + 0.5f));
+ float nPercentageDone = count / (nTotalBlocks * 0.01f);
if (clientModel->getStatusBarWarnings() == "")
{
progressBarLabel->setText(tr("Synchronizing with network..."));
progressBarLabel->setVisible(true);
- progressBar->setFormat("~" + QString::number(nRemainingBlocks)+ tr(" blocks remaining"));
+ progressBar->setFormat("~" + tr("%n block(s) remaining", "", nRemainingBlocks));
progressBar->setMaximum(nTotalBlocks);
progressBar->setValue(count);
progressBar->setVisible(true);
@@ -485,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% done).").arg(count).arg(nTotalBlocks).arg(nPercentageDone);
+ tooltip = tr("Downloaded %1 of %2 blocks of transaction history (%3% done).").arg(count).arg(nTotalBlocks).arg(nPercentageDone, 0, 'f', 2);
}
else
{