Browse Source

qt: Remove an obscure option no-one cares about

Remove the "Display addresses" setting checkbox. It doesn't do what
the tooltip says, and seems kind of pointless in any case.

Fixes #4580.
pull/1/head
Wladimir J. van der Laan 8 years ago
parent
commit
bdba2dd000
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 10
      src/qt/forms/optionsdialog.ui
  2. 1
      src/qt/optionsdialog.cpp
  3. 10
      src/qt/optionsmodel.cpp
  4. 3
      src/qt/optionsmodel.h
  5. 2
      src/qt/transactiontablemodel.cpp

10
src/qt/forms/optionsdialog.ui

@ -451,16 +451,6 @@ @@ -451,16 +451,6 @@
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="displayAddresses">
<property name="toolTip">
<string>Whether to show Bitcoin addresses in the transaction list or not.</string>
</property>
<property name="text">
<string>&amp;Display addresses in transaction list</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3_Display">
<item>

1
src/qt/optionsdialog.cpp

@ -185,7 +185,6 @@ void OptionsDialog::setMapper() @@ -185,7 +185,6 @@ void OptionsDialog::setMapper()
/* Display */
mapper->addMapping(ui->lang, OptionsModel::Language);
mapper->addMapping(ui->unit, OptionsModel::DisplayUnit);
mapper->addMapping(ui->displayAddresses, OptionsModel::DisplayAddresses);
mapper->addMapping(ui->thirdPartyTxUrls, OptionsModel::ThirdPartyTxUrls);
}

10
src/qt/optionsmodel.cpp

@ -59,10 +59,6 @@ void OptionsModel::Init() @@ -59,10 +59,6 @@ void OptionsModel::Init()
settings.setValue("nDisplayUnit", BitcoinUnits::BTC);
nDisplayUnit = settings.value("nDisplayUnit").toInt();
if (!settings.contains("bDisplayAddresses"))
settings.setValue("bDisplayAddresses", false);
bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool();
if (!settings.contains("strThirdPartyTxUrls"))
settings.setValue("strThirdPartyTxUrls", "");
strThirdPartyTxUrls = settings.value("strThirdPartyTxUrls", "").toString();
@ -200,8 +196,6 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const @@ -200,8 +196,6 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
#endif
case DisplayUnit:
return nDisplayUnit;
case DisplayAddresses:
return bDisplayAddresses;
case ThirdPartyTxUrls:
return strThirdPartyTxUrls;
case Language:
@ -296,10 +290,6 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in @@ -296,10 +290,6 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
case DisplayUnit:
setDisplayUnit(value);
break;
case DisplayAddresses:
bDisplayAddresses = value.toBool();
settings.setValue("bDisplayAddresses", bDisplayAddresses);
break;
case ThirdPartyTxUrls:
if (strThirdPartyTxUrls != value.toString()) {
strThirdPartyTxUrls = value.toString();

3
src/qt/optionsmodel.h

@ -34,7 +34,6 @@ public: @@ -34,7 +34,6 @@ public:
ProxyPort, // int
Fee, // qint64
DisplayUnit, // BitcoinUnits::Unit
DisplayAddresses, // bool
ThirdPartyTxUrls, // QString
Language, // QString
CoinControlFeatures, // bool
@ -58,7 +57,6 @@ public: @@ -58,7 +57,6 @@ public:
bool getMinimizeToTray() { return fMinimizeToTray; }
bool getMinimizeOnClose() { return fMinimizeOnClose; }
int getDisplayUnit() { return nDisplayUnit; }
bool getDisplayAddresses() { return bDisplayAddresses; }
QString getThirdPartyTxUrls() { return strThirdPartyTxUrls; }
bool getProxySettings(QNetworkProxy& proxy) const;
bool getCoinControlFeatures() { return fCoinControlFeatures; }
@ -74,7 +72,6 @@ private: @@ -74,7 +72,6 @@ private:
bool fMinimizeOnClose;
QString language;
int nDisplayUnit;
bool bDisplayAddresses;
QString strThirdPartyTxUrls;
bool fCoinControlFeatures;
/* settings that were overriden by command-line */

2
src/qt/transactiontablemodel.cpp

@ -346,7 +346,7 @@ QString TransactionTableModel::lookupAddress(const std::string &address, bool to @@ -346,7 +346,7 @@ QString TransactionTableModel::lookupAddress(const std::string &address, bool to
{
description += label + QString(" ");
}
if(label.isEmpty() || walletModel->getOptionsModel()->getDisplayAddresses() || tooltip)
if(label.isEmpty() || tooltip)
{
description += QString("(") + QString::fromStdString(address) + QString(")");
}

Loading…
Cancel
Save