Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions src/qt/forms/optionsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
<item>
<widget class="QCheckBox" name="enableServer">
<property name="toolTip">
<string extracomment="Tooltip text for Options window setting that enables the RPC server.">This allows you or a third party tool to communicate with the node through command-line and JSON-RPC commands.</string>
<string extracomment="Tooltip text for Options window setting that enables the RPC server.">This allows you or a third-party tool to communicate with the node through command-line and JSON-RPC commands.</string>
</property>
<property name="text">
<string extracomment="An Options window setting to enable the RPC server.">Enable RPC &amp;server</string>
Expand Down Expand Up @@ -226,6 +226,33 @@
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3_Display">
<item>
<widget class="QLabel" name="thirdPartyTxUrlsLabel">
<property name="toolTip">
<string>Third-party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. "%s" in the URL is replaced by the transaction hash. Multiple URLs are separated by a vertical bar |.</string>
</property>
<property name="text">
<string>&amp;Third-party transaction URLs</string>
</property>
<property name="buddy">
<cstring>thirdPartyTxUrls</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="thirdPartyTxUrls">
<property name="toolTip">
<string>Third-party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. "%s" in the URL is replaced by the transaction hash. Multiple URLs are separated by a vertical bar |.</string>
</property>
<property name="placeholderText">
<string notr="true">https://example.com/tx/%s</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
Expand Down Expand Up @@ -734,33 +761,6 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3_Display">
<item>
<widget class="QLabel" name="thirdPartyTxUrlsLabel">
<property name="toolTip">
<string>Third-party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. %s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |.</string>
</property>
<property name="text">
<string>&amp;Third-party transaction URLs</string>
</property>
<property name="buddy">
<cstring>thirdPartyTxUrls</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="thirdPartyTxUrls">
<property name="toolTip">
<string>Third-party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. %s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |.</string>
</property>
<property name="placeholderText">
<string notr="true">https://example.com/tx/%s</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="font_groupBox">
<property name="title">
Expand Down
4 changes: 2 additions & 2 deletions src/qt/optionsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ void OptionsDialog::setModel(OptionsModel *_model)
connect(ui->externalSignerPath, &QLineEdit::textChanged, [this]{ showRestartWarning(); });
connect(ui->threadsScriptVerif, qOverload<int>(&QSpinBox::valueChanged), this, &OptionsDialog::showRestartWarning);
/* Wallet */
connect(ui->thirdPartyTxUrls, &QLineEdit::textChanged, [this] { showRestartWarning(); });
connect(ui->spendZeroConfChange, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
/* Network */
connect(ui->allowIncoming, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
Expand All @@ -215,7 +216,6 @@ void OptionsDialog::setModel(OptionsModel *_model)
connect(ui->connectSocksTor, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
/* Display */
connect(ui->lang, qOverload<>(&QValueComboBox::valueChanged), [this]{ showRestartWarning(); });
connect(ui->thirdPartyTxUrls, &QLineEdit::textChanged, [this]{ showRestartWarning(); });
}

void OptionsDialog::setCurrentTab(OptionsDialog::Tab tab)
Expand All @@ -241,6 +241,7 @@ void OptionsDialog::setMapper()
mapper->addMapping(ui->spendZeroConfChange, OptionsModel::SpendZeroConfChange);
mapper->addMapping(ui->coinControlFeatures, OptionsModel::CoinControlFeatures);
mapper->addMapping(ui->subFeeFromAmount, OptionsModel::SubFeeFromAmount);
mapper->addMapping(ui->thirdPartyTxUrls, OptionsModel::ThirdPartyTxUrls);
mapper->addMapping(ui->externalSignerPath, OptionsModel::ExternalSignerPath);

/* Network */
Expand Down Expand Up @@ -269,7 +270,6 @@ void OptionsDialog::setMapper()
/* Display */
mapper->addMapping(ui->lang, OptionsModel::Language);
mapper->addMapping(ui->unit, OptionsModel::DisplayUnit);
mapper->addMapping(ui->thirdPartyTxUrls, OptionsModel::ThirdPartyTxUrls);
mapper->addMapping(ui->embeddedFont_radioButton, OptionsModel::UseEmbeddedMonospacedFont);
}

Expand Down
20 changes: 10 additions & 10 deletions src/qt/optionsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ void OptionsModel::Init(bool resetSettings)
settings.setValue("nDisplayUnit", BitcoinUnits::BTC);
nDisplayUnit = settings.value("nDisplayUnit").toInt();

if (!settings.contains("strThirdPartyTxUrls"))
settings.setValue("strThirdPartyTxUrls", "");
strThirdPartyTxUrls = settings.value("strThirdPartyTxUrls", "").toString();

if (!settings.contains("fCoinControlFeatures"))
settings.setValue("fCoinControlFeatures", false);
fCoinControlFeatures = settings.value("fCoinControlFeatures", false).toBool();
Expand Down Expand Up @@ -129,6 +125,10 @@ void OptionsModel::Init(bool resetSettings)
settings.setValue("SubFeeFromAmount", false);
}
m_sub_fee_from_amount = settings.value("SubFeeFromAmount", false).toBool();

if (!settings.contains("strThirdPartyTxUrls"))
settings.setValue("strThirdPartyTxUrls", "");
strThirdPartyTxUrls = settings.value("strThirdPartyTxUrls", "").toString();
#endif

// Network
Expand Down Expand Up @@ -349,11 +349,11 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
return settings.value("external_signer_path");
case SubFeeFromAmount:
return m_sub_fee_from_amount;
case ThirdPartyTxUrls:
return strThirdPartyTxUrls;
#endif
case DisplayUnit:
return nDisplayUnit;
case ThirdPartyTxUrls:
return strThirdPartyTxUrls;
case Language:
return settings.value("language");
case UseEmbeddedMonospacedFont:
Expand Down Expand Up @@ -480,17 +480,17 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
m_sub_fee_from_amount = value.toBool();
settings.setValue("SubFeeFromAmount", m_sub_fee_from_amount);
break;
#endif
case DisplayUnit:
setDisplayUnit(value);
break;
case ThirdPartyTxUrls:
if (strThirdPartyTxUrls != value.toString()) {
strThirdPartyTxUrls = value.toString();
settings.setValue("strThirdPartyTxUrls", strThirdPartyTxUrls);
setRestartRequired(true);
}
break;
#endif
case DisplayUnit:
setDisplayUnit(value);
break;
case Language:
if (settings.value("language") != value) {
settings.setValue("language", value);
Expand Down