diff options
| author | Wladimir J. van der Laan <[email protected]> | 2012-01-17 00:35:16 -0800 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2012-01-17 00:35:16 -0800 |
| commit | 43cda5f325f53e8941efa7f712aed66e3fde172a (patch) | |
| tree | e86b9b17d1ad1515ef4f386fabacb740494ac2f8 /src | |
| parent | Fix handling of default ports (diff) | |
| parent | Remove erroneous ":" in front of port in options dialog (introduced with netw... (diff) | |
| download | discoin-43cda5f325f53e8941efa7f712aed66e3fde172a.tar.xz discoin-43cda5f325f53e8941efa7f712aed66e3fde172a.zip | |
Merge pull request #762 from laanwj/qtprogressfix
Revert to global progress indication, also fix the build
Diffstat (limited to 'src')
| -rw-r--r-- | src/qt/bitcoingui.cpp | 5 | ||||
| -rw-r--r-- | src/qt/optionsmodel.cpp | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index d4ce8a79e..d77279d42 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 { diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 3237845c2..edc1d61e9 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: @@ -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); |