mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-24 22:45:41 +01:00
gui: add external signer path to options dialog
This commit is contained in:
@@ -117,6 +117,13 @@ void OptionsModel::Init(bool resetSettings)
|
||||
settings.setValue("bSpendZeroConfChange", true);
|
||||
if (!gArgs.SoftSetBoolArg("-spendzeroconfchange", settings.value("bSpendZeroConfChange").toBool()))
|
||||
addOverriddenOption("-spendzeroconfchange");
|
||||
|
||||
if (!settings.contains("external_signer_path"))
|
||||
settings.setValue("external_signer_path", "");
|
||||
|
||||
if (!gArgs.SoftSetArg("-signer", settings.value("external_signer_path").toString().toStdString())) {
|
||||
addOverriddenOption("-signer");
|
||||
}
|
||||
#endif
|
||||
|
||||
// Network
|
||||
@@ -326,6 +333,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
|
||||
#ifdef ENABLE_WALLET
|
||||
case SpendZeroConfChange:
|
||||
return settings.value("bSpendZeroConfChange");
|
||||
case ExternalSignerPath:
|
||||
return settings.value("external_signer_path");
|
||||
#endif
|
||||
case DisplayUnit:
|
||||
return nDisplayUnit;
|
||||
@@ -445,6 +454,12 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
|
||||
setRestartRequired(true);
|
||||
}
|
||||
break;
|
||||
case ExternalSignerPath:
|
||||
if (settings.value("external_signer_path") != value.toString()) {
|
||||
settings.setValue("external_signer_path", value.toString());
|
||||
setRestartRequired(true);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case DisplayUnit:
|
||||
setDisplayUnit(value);
|
||||
|
||||
Reference in New Issue
Block a user