diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-07-30 17:42:02 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-07-30 17:42:02 +0200 |
commit | 2f5d380943c4f56114f81a6aee81a57579492103 (patch) | |
tree | 57d4e28176a090235845da899bf53c9645062eaa /src/qt/optionsmodel.cpp | |
parent | 1aafe34a0839153d7027fdd0251edc32bd8001aa (diff) |
Hide addresses in transaction overview by default, they can be re-shown as a configuration option
Diffstat (limited to 'src/qt/optionsmodel.cpp')
-rw-r--r-- | src/qt/optionsmodel.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index d72a0e9e91..4656ad08d5 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -8,11 +8,13 @@ OptionsModel::OptionsModel(CWallet *wallet, QObject *parent) : QAbstractListModel(parent), wallet(wallet), - nDisplayUnit(BitcoinUnits::BTC) + nDisplayUnit(BitcoinUnits::BTC), + bDisplayAddresses(false) { // Read our specific settings from the wallet db CWalletDB walletdb(wallet->strWalletFile); walletdb.ReadSetting("nDisplayUnit", nDisplayUnit); + walletdb.ReadSetting("bDisplayAddresses", bDisplayAddresses); } int OptionsModel::rowCount(const QModelIndex & parent) const @@ -44,6 +46,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const return QVariant(nTransactionFee); case DisplayUnit: return QVariant(nDisplayUnit); + case DisplayAddresses: + return QVariant(bDisplayAddresses); default: return QVariant(); } @@ -121,6 +125,10 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in walletdb.WriteSetting("nDisplayUnit", nDisplayUnit); emit displayUnitChanged(unit); } + case DisplayAddresses: { + bDisplayAddresses = value.toBool(); + walletdb.WriteSetting("bDisplayAddresses", bDisplayAddresses); + } default: break; } @@ -149,3 +157,8 @@ int OptionsModel::getDisplayUnit() { return nDisplayUnit; } + +bool OptionsModel::getDisplayAddresses() +{ + return bDisplayAddresses; +} |