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