mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-12 19:20:42 +02:00
Merge 5861 via gui_restore_addresses
This commit is contained in:
commit
39668f3647
@ -874,6 +874,16 @@
|
||||
</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>&Display addresses in transaction list</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3_Display">
|
||||
<item>
|
||||
|
@ -385,6 +385,7 @@ void OptionsDialog::setMapper()
|
||||
mapper->addMapping(ui->peersTabAlternatingRowColors, OptionsModel::PeersTabAlternatingRowColors);
|
||||
mapper->addMapping(ui->lang, OptionsModel::Language);
|
||||
mapper->addMapping(ui->unit, OptionsModel::DisplayUnit);
|
||||
mapper->addMapping(ui->displayAddresses, OptionsModel::DisplayAddresses);
|
||||
mapper->addMapping(ui->thirdPartyTxUrls, OptionsModel::ThirdPartyTxUrls);
|
||||
}
|
||||
|
||||
|
@ -263,6 +263,10 @@ bool OptionsModel::Init(bilingual_str& error)
|
||||
settings.setValue("DisplayBitcoinUnit", QVariant::fromValue(m_display_bitcoin_unit));
|
||||
}
|
||||
|
||||
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();
|
||||
@ -580,6 +584,8 @@ QVariant OptionsModel::getOption(OptionID option, const std::string& suffix) con
|
||||
#endif
|
||||
case DisplayUnit:
|
||||
return QVariant::fromValue(m_display_bitcoin_unit);
|
||||
case DisplayAddresses:
|
||||
return bDisplayAddresses;
|
||||
case ThirdPartyTxUrls:
|
||||
return strThirdPartyTxUrls;
|
||||
case Language:
|
||||
@ -791,6 +797,10 @@ bool OptionsModel::setOption(OptionID option, const QVariant& value, const std::
|
||||
case DisplayUnit:
|
||||
setDisplayUnit(value);
|
||||
break;
|
||||
case DisplayAddresses:
|
||||
bDisplayAddresses = value.toBool();
|
||||
settings.setValue("bDisplayAddresses", bDisplayAddresses);
|
||||
break;
|
||||
case ThirdPartyTxUrls:
|
||||
if (strThirdPartyTxUrls != value.toString()) {
|
||||
strThirdPartyTxUrls = value.toString();
|
||||
|
@ -58,6 +58,7 @@ public:
|
||||
ProxyIPTor, // QString
|
||||
ProxyPortTor, // int
|
||||
DisplayUnit, // BitcoinUnit
|
||||
DisplayAddresses, // bool
|
||||
ThirdPartyTxUrls, // QString
|
||||
Language, // QString
|
||||
FontForMoney, // FontChoice
|
||||
@ -106,6 +107,7 @@ public:
|
||||
bool getMinimizeToTray() const { return fMinimizeToTray; }
|
||||
bool getMinimizeOnClose() const { return fMinimizeOnClose; }
|
||||
BitcoinUnit getDisplayUnit() const { return m_display_bitcoin_unit; }
|
||||
bool getDisplayAddresses() const { return bDisplayAddresses; }
|
||||
QString getThirdPartyTxUrls() const { return strThirdPartyTxUrls; }
|
||||
QFont getFontForMoney() const;
|
||||
FontChoice getFontChoiceForQRCodes() const { return m_font_qrcodes; }
|
||||
@ -135,6 +137,7 @@ private:
|
||||
bool fMinimizeOnClose;
|
||||
QString language;
|
||||
BitcoinUnit m_display_bitcoin_unit;
|
||||
bool bDisplayAddresses;
|
||||
QString strThirdPartyTxUrls;
|
||||
FontChoice m_font_money{FontChoiceAbstract::EmbeddedFont};
|
||||
FontChoice m_font_qrcodes{FontChoiceAbstract::EmbeddedFont};
|
||||
|
@ -363,7 +363,7 @@ QString TransactionTableModel::lookupAddress(const std::string &address, bool to
|
||||
{
|
||||
description += label;
|
||||
}
|
||||
if(label.isEmpty() || tooltip)
|
||||
if(label.isEmpty() || walletModel->getOptionsModel()->getDisplayAddresses() || tooltip)
|
||||
{
|
||||
description += QString(" (") + QString::fromStdString(address) + QString(")");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user