diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-12-11 15:00:56 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-01-11 12:36:20 +0100 |
commit | b7f4b6d35da7b63529a728eb9333fe424b2a5c6d (patch) | |
tree | 6a0820ae13a8131ce3a0e2e0acf3754089b88ba3 /src/qt/optionsmodel.cpp | |
parent | ec41342e3dea6e2137a0fc17288e2be77710a631 (diff) |
GUI for --disable-wallet compiles and -disablewallet mode
There is not much in the GUI to be done without wallet,
though it's possible to change options, watch the sync process,
and use the debug console.
So embed the debug console in the main window.
Diffstat (limited to 'src/qt/optionsmodel.cpp')
-rw-r--r-- | src/qt/optionsmodel.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index c7817a94a8..1133c457b3 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -14,8 +14,10 @@ #include "init.h" #include "main.h" #include "net.h" +#ifdef ENABLE_WALLET #include "wallet.h" #include "walletdb.h" +#endif #include <QSettings> #include <QStringList> @@ -67,8 +69,10 @@ void OptionsModel::Init() // by command-line and show this in the UI. // Main +#ifdef ENABLE_WALLET if (!settings.contains("nTransactionFee")) settings.setValue("nTransactionFee", 0); +#endif if (!settings.contains("nDatabaseCache")) settings.setValue("nDatabaseCache", 25); @@ -137,6 +141,7 @@ void OptionsModel::Upgrade() settings.setValue("bImportFinished", true); +#ifdef ENABLE_WALLET // Move settings from old wallet.dat (if any): CWalletDB walletdb(strWalletFile); @@ -181,6 +186,7 @@ void OptionsModel::Upgrade() walletdb.EraseSetting("addrProxy"); } } +#endif Init(); } @@ -227,6 +233,7 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const case ProxySocksVersion: return settings.value("nSocksVersion", 5); +#ifdef ENABLE_WALLET case Fee: // Attention: Init() is called before nTransactionFee is set in AppInit2()! // To ensure we can change the fee on-the-fly update our QSetting when @@ -236,6 +243,7 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const // Todo: Consider to revert back to use just nTransactionFee here, if we don't want // -paytxfee to update our QSettings! return settings.value("nTransactionFee"); +#endif case DisplayUnit: return nDisplayUnit; case DisplayAddresses: @@ -318,13 +326,14 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in } } break; - +#ifdef ENABLE_WALLET case Fee: // core option - can be changed on-the-fly // Todo: Add is valid check and warn via message, if not nTransactionFee = value.toLongLong(); settings.setValue("nTransactionFee", (qint64)nTransactionFee); emit transactionFeeChanged(nTransactionFee); break; +#endif case DisplayUnit: nDisplayUnit = value.toInt(); settings.setValue("nDisplayUnit", nDisplayUnit); |