mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 11:32:46 +01:00
merge bitcoin-core/gui#416: Add RPC setting
This commit is contained in:
parent
fa2f7acc2a
commit
063ef3a2d0
5
doc/release-notes-6337.md
Normal file
5
doc/release-notes-6337.md
Normal file
@ -0,0 +1,5 @@
|
||||
GUI changes
|
||||
-----------
|
||||
|
||||
A new option has been added in to the "Main" tab in "Options" that allow
|
||||
users to enable RPC server functionality.
|
@ -112,7 +112,7 @@
|
||||
<string>Automatically start %1 after logging in to the system.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Start %1 on system login</string>
|
||||
<string>Start %1 on system &login</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -291,13 +291,23 @@
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<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>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string extracomment="An Options window setting to enable the RPC server.">Enable RPC &server</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_Main">
|
||||
<property name="orientation">
|
||||
|
@ -267,6 +267,7 @@ void OptionsDialog::setModel(OptionsModel *_model)
|
||||
connect(ui->spendZeroConfChange, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
|
||||
/* Network */
|
||||
connect(ui->allowIncoming, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
|
||||
connect(ui->enableServer, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
|
||||
connect(ui->connectSocks, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
|
||||
connect(ui->connectSocksTor, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
|
||||
/* Display */
|
||||
@ -343,6 +344,7 @@ void OptionsDialog::setMapper()
|
||||
mapper->addMapping(ui->mapPortUpnp, OptionsModel::MapPortUPnP);
|
||||
mapper->addMapping(ui->mapPortNatpmp, OptionsModel::MapPortNatpmp);
|
||||
mapper->addMapping(ui->allowIncoming, OptionsModel::Listen);
|
||||
mapper->addMapping(ui->enableServer, OptionsModel::Server);
|
||||
|
||||
mapper->addMapping(ui->connectSocks, OptionsModel::ProxyUse);
|
||||
mapper->addMapping(ui->proxyIp, OptionsModel::ProxyIP);
|
||||
|
@ -275,6 +275,13 @@ void OptionsModel::Init(bool resetSettings)
|
||||
gArgs.SoftSetBoolArg("-listenonion", false);
|
||||
}
|
||||
|
||||
if (!settings.contains("server")) {
|
||||
settings.setValue("server", false);
|
||||
}
|
||||
if (!gArgs.SoftSetBoolArg("-server", settings.value("server").toBool())) {
|
||||
addOverriddenOption("-server");
|
||||
}
|
||||
|
||||
if (!settings.contains("fUseProxy"))
|
||||
settings.setValue("fUseProxy", false);
|
||||
if (!settings.contains("addrProxy"))
|
||||
@ -529,6 +536,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
|
||||
return settings.value("nThreadsScriptVerif");
|
||||
case Listen:
|
||||
return settings.value("fListen");
|
||||
case Server:
|
||||
return settings.value("server");
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
@ -795,6 +804,12 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
|
||||
setRestartRequired(true);
|
||||
}
|
||||
break;
|
||||
case Server:
|
||||
if (settings.value("server") != value) {
|
||||
settings.setValue("server", value);
|
||||
setRestartRequired(true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -86,6 +86,7 @@ public:
|
||||
CoinJoinDenomsHardCap,// int
|
||||
CoinJoinMultiSession, // bool
|
||||
Listen, // bool
|
||||
Server, // bool
|
||||
OptionIDRowCount,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user