From b2a967cd0b158f40787cc1acb4f1e245b5066cdf Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 17 Jan 2012 09:19:23 +0100 Subject: [PATCH 1/3] Revert to global progress indication (see #753) --- src/qt/bitcoingui.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index d4ce8a79e1f..d77279d42bc 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -417,7 +417,6 @@ void BitcoinGUI::setNumBlocks(int count) { if(!clientModel) return; - int initTotal = clientModel->getNumBlocksAtStartup(); int total = clientModel->getNumBlocksOfPeers(); QString tooltip; @@ -428,8 +427,8 @@ void BitcoinGUI::setNumBlocks(int count) progressBarLabel->setVisible(true); progressBarLabel->setText(tr("Synchronizing with network...")); progressBar->setVisible(true); - progressBar->setMaximum(total - initTotal); - progressBar->setValue(count - initTotal); + progressBar->setMaximum(total); + progressBar->setValue(count); } else { From be4d08b261f8c8d08d5b28271e2f8234dc7de763 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 17 Jan 2012 09:27:03 +0100 Subject: [PATCH 2/3] fix the build (port IP validation in options to network refactoring) --- src/qt/optionsmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 3237845c2cb..241db345b90 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -87,7 +87,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in case ProxyIP: { // Use CAddress to parse and check IP - CAddress addr(value.toString().toStdString() + ":1"); + CNetAddr addr(value.toString().toStdString()); if (addr.IsValid()) { addrProxy.SetIP(addr); From 06706ab8ef3a5fc7448ddfc1f64f92505cd710ee Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 17 Jan 2012 09:34:24 +0100 Subject: [PATCH 3/3] Remove erroneous ":" in front of port in options dialog (introduced with network refactor) --- src/qt/optionsmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 241db345b90..edc1d61e9d2 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -40,7 +40,7 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const case ProxyIP: return QVariant(QString::fromStdString(addrProxy.ToStringIP())); case ProxyPort: - return QVariant(QString::fromStdString(addrProxy.ToStringPort())); + return QVariant(addrProxy.GetPort()); case Fee: return QVariant(nTransactionFee); case DisplayUnit: