diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/init.cpp | 6 | ||||
-rw-r--r-- | src/main.cpp | 2 | ||||
-rw-r--r-- | src/main.h | 7 | ||||
-rw-r--r-- | src/qt/bitcoinamountfield.cpp | 16 | ||||
-rw-r--r-- | src/qt/bitcoinamountfield.h | 4 | ||||
-rw-r--r-- | src/qt/optionsdialog.cpp | 2 | ||||
-rw-r--r-- | src/qt/utilitydialog.cpp | 4 |
7 files changed, 23 insertions, 18 deletions
diff --git a/src/init.cpp b/src/init.cpp index a2c07c9f66..9ba77105b4 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -338,6 +338,8 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles) LogPrintf("Importing bootstrap.dat...\n"); LoadExternalBlockFile(file); RenameOver(pathBootstrap, pathBootstrapOld); + } else { + LogPrintf("Warning: Could not open bootstrap file %s\n", pathBootstrap.string()); } } @@ -346,8 +348,10 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles) FILE *file = fopen(path.string().c_str(), "rb"); if (file) { CImportingNow imp; - LogPrintf("Importing %s...\n", path.string()); + LogPrintf("Importing blocks file %s...\n", path.string()); LoadExternalBlockFile(file); + } else { + LogPrintf("Warning: Could not open blocks file %s\n", path.string()); } } } diff --git a/src/main.cpp b/src/main.cpp index f61b282865..8e879c3169 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -443,7 +443,7 @@ bool IsStandardTx(const CTransaction& tx, string& reason) return false; } if (!txin.scriptSig.HasCanonicalPushes()) { - reason = "non-canonical-push"; + reason = "scriptsig-non-canonical-push"; return false; } } diff --git a/src/main.h b/src/main.h index 42b96abb37..781562854f 100644 --- a/src/main.h +++ b/src/main.h @@ -77,12 +77,6 @@ static const unsigned char REJECT_CHECKPOINT = 0x43; extern CScript COINBASE_FLAGS; - - - - - - extern CCriticalSection cs_main; extern CTxMemPool mempool; extern std::map<uint256, CBlockIndex*> mapBlockIndex; @@ -96,7 +90,6 @@ extern bool fBenchmark; extern int nScriptCheckThreads; extern bool fTxIndex; extern unsigned int nCoinCacheSize; -extern bool fHaveGUI; // Minimum disk space required - used in CheckDiskSpace() static const uint64_t nMinDiskSpace = 52428800; diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp index 923b17e66d..25ad0c66af 100644 --- a/src/qt/bitcoinamountfield.cpp +++ b/src/qt/bitcoinamountfield.cpp @@ -19,12 +19,12 @@ BitcoinAmountField::BitcoinAmountField(QWidget *parent) : amount(0), currentUnit(-1) { + nSingleStep = 100000; // satoshis + amount = new QDoubleSpinBox(this); amount->setLocale(QLocale::c()); - amount->setDecimals(8); amount->installEventFilter(this); amount->setMaximumWidth(170); - amount->setSingleStep(0.001); QHBoxLayout *layout = new QHBoxLayout(this); layout->addWidget(amount); @@ -159,11 +159,7 @@ void BitcoinAmountField::unitChanged(int idx) // Set max length after retrieving the value, to prevent truncation amount->setDecimals(BitcoinUnits::decimals(currentUnit)); amount->setMaximum(qPow(10, BitcoinUnits::amountDigits(currentUnit)) - qPow(10, -amount->decimals())); - - if (currentUnit == BitcoinUnits::uBTC) - amount->setSingleStep(0.01); - else - amount->setSingleStep(0.001); + amount->setSingleStep((double)nSingleStep / (double)BitcoinUnits::factor(currentUnit)); if (valid) { @@ -182,3 +178,9 @@ void BitcoinAmountField::setDisplayUnit(int newUnit) { unit->setValue(newUnit); } + +void BitcoinAmountField::setSingleStep(qint64 step) +{ + nSingleStep = step; + unitChanged(unit->currentIndex()); +} diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h index d54f536b1f..521a9ed561 100644 --- a/src/qt/bitcoinamountfield.h +++ b/src/qt/bitcoinamountfield.h @@ -26,6 +26,9 @@ public: qint64 value(bool *valid=0) const; void setValue(qint64 value); + /** Set single step in satoshis **/ + void setSingleStep(qint64 step); + /** Make read-only **/ void setReadOnly(bool fReadOnly); @@ -56,6 +59,7 @@ private: QDoubleSpinBox *amount; QValueComboBox *unit; int currentUnit; + qint64 nSingleStep; void setText(const QString &text); QString text() const; diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index 317e1db7d3..f4eb7ef07e 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -15,6 +15,7 @@ #include "optionsmodel.h" #include "netbase.h" +#include "main.h" #include <QDir> #include <QIntValidator> @@ -93,6 +94,7 @@ OptionsDialog::OptionsDialog(QWidget *parent) : } ui->unit->setModel(new BitcoinUnits(this)); + ui->transactionFee->setSingleStep(CTransaction::nMinTxFee); /* Widget-to-option mapper */ mapper = new MonitoredDataMapper(this); diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp index 9c5bed5b89..24992db465 100644 --- a/src/qt/utilitydialog.cpp +++ b/src/qt/utilitydialog.cpp @@ -38,9 +38,9 @@ void AboutDialog::setModel(ClientModel *model) * 32 and 64 bit builds. On other architectures, 32/64 bit may be more ambigious. */ #if defined(__x86_64__) - version += " (64-bit)"; + version += tr(" (%1-bit)").arg(64); #elif defined(__i386__ ) - version += " (32-bit)"; + version += tr(" (%1-bit)").arg(32); #endif ui->versionLabel->setText(version); } |