aboutsummaryrefslogtreecommitdiff
path: root/src/qt/optionsmodel.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2012-06-08 15:21:55 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2012-06-13 16:24:25 +0200
commitc4443c2be141e5f45bb10376056f3083e97cde50 (patch)
tree437bad1af7dccf5ced0f0056757d134334f4b056 /src/qt/optionsmodel.cpp
parentc4879a0c2fea705b6ad7956502acc7897838e841 (diff)
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
Diffstat (limited to 'src/qt/optionsmodel.cpp')
-rw-r--r--src/qt/optionsmodel.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index 64d91cb0b1..d6c6bbf409 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -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);