re-work optionsdialog to a tabbed UI based on an ui-file
- extend network options with a SOCKS version selection - changing "Unit to show amounts in:" now also updates the unit used in the transaction fee box - string updates - link Apply button and OK button when enabling or disabling them - use LookupNumeric() from netbase to verify proxy address (via an EventFilter) - change proxy address field to QValidatedLineEdit and add visual feedback - add a status label used for displaying a message for invalid proxy addresses - allow usage of IPv6 address as proxy address - added warning message when enabling / disabling SOCKS proxy
This commit is contained in:
@@ -20,6 +20,7 @@ bool static ApplyProxySettings()
|
||||
if (!settings.value("fUseProxy", false).toBool()) {
|
||||
addrProxy = CService();
|
||||
nSocksVersion = 0;
|
||||
return false;
|
||||
}
|
||||
if (nSocksVersion && !addrProxy.IsValid())
|
||||
return false;
|
||||
@@ -53,6 +54,8 @@ void OptionsModel::Init()
|
||||
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
|
||||
if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool())
|
||||
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
|
||||
if (settings.contains("nSocksVersion") && settings.value("fUseProxy").toBool())
|
||||
SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString());
|
||||
if (settings.contains("detachDB"))
|
||||
SoftSetBoolArg("-detachdb", settings.value("detachDB").toBool());
|
||||
if (!language.isEmpty())
|
||||
@@ -142,7 +145,7 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
|
||||
case ProxyUse:
|
||||
return settings.value("fUseProxy", false);
|
||||
case ProxySocksVersion:
|
||||
return settings.value("nSocksVersion", false);
|
||||
return settings.value("nSocksVersion", 5);
|
||||
case ProxyIP: {
|
||||
CService addrProxy;
|
||||
if (GetProxy(NET_IPV4, addrProxy))
|
||||
@@ -203,6 +206,10 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
|
||||
settings.setValue("fUseProxy", value.toBool());
|
||||
ApplyProxySettings();
|
||||
break;
|
||||
case ProxySocksVersion:
|
||||
settings.setValue("nSocksVersion", value.toInt());
|
||||
ApplyProxySettings();
|
||||
break;
|
||||
case ProxyIP:
|
||||
{
|
||||
CService addrProxy("127.0.0.1", 9050);
|
||||
|
||||
Reference in New Issue
Block a user