diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llpanelnetwork.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/linden/indra/newview/llpanelnetwork.cpp b/linden/indra/newview/llpanelnetwork.cpp index 2edd1a1..16b9a76 100644 --- a/linden/indra/newview/llpanelnetwork.cpp +++ b/linden/indra/newview/llpanelnetwork.cpp | |||
@@ -64,6 +64,14 @@ BOOL LLPanelNetwork::postBuild() | |||
64 | childSetValue("connection_port_enabled", gSavedSettings.getBOOL("ConnectionPortEnabled")); | 64 | childSetValue("connection_port_enabled", gSavedSettings.getBOOL("ConnectionPortEnabled")); |
65 | childSetValue("connection_port", (F32)gSavedSettings.getU32("ConnectionPort")); | 65 | childSetValue("connection_port", (F32)gSavedSettings.getU32("ConnectionPort")); |
66 | 66 | ||
67 | childSetCommitCallback("xmlrpc_proxy_enabled", onCommitXMLRPCProxyEnabled, this); | ||
68 | childSetValue("xmlrpc_proxy_enabled", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); | ||
69 | childSetValue("xmlrpc_proxy_editor", gSavedSettings.getString("XMLRPCProxyAddress")); | ||
70 | childSetValue("xmlrpc_proxy_port", gSavedSettings.getS32("XMLRPCProxyPort")); | ||
71 | childSetEnabled("xmlrpc_proxy_text_label", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); | ||
72 | childSetEnabled("xmlrpc_proxy_editor", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); | ||
73 | childSetEnabled("xmlrpc_proxy_port", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); | ||
74 | |||
67 | return TRUE; | 75 | return TRUE; |
68 | } | 76 | } |
69 | 77 | ||
@@ -79,6 +87,10 @@ void LLPanelNetwork::apply() | |||
79 | gSavedSettings.setF32("ThrottleBandwidthKBPS", childGetValue("max_bandwidth").asReal()); | 87 | gSavedSettings.setF32("ThrottleBandwidthKBPS", childGetValue("max_bandwidth").asReal()); |
80 | gSavedSettings.setBOOL("ConnectionPortEnabled", childGetValue("connection_port_enabled")); | 88 | gSavedSettings.setBOOL("ConnectionPortEnabled", childGetValue("connection_port_enabled")); |
81 | gSavedSettings.setU32("ConnectionPort", childGetValue("connection_port").asInteger()); | 89 | gSavedSettings.setU32("ConnectionPort", childGetValue("connection_port").asInteger()); |
90 | |||
91 | gSavedSettings.setBOOL("XMLRPCProxyEnabled", childGetValue("xmlrpc_proxy_enabled")); | ||
92 | gSavedSettings.setString("XMLRPCProxyAddress", childGetValue("xmlrpc_proxy_editor")); | ||
93 | gSavedSettings.setS32("XMLRPCProxyPort", childGetValue("xmlrpc_proxy_port")); | ||
82 | } | 94 | } |
83 | 95 | ||
84 | void LLPanelNetwork::cancel() | 96 | void LLPanelNetwork::cancel() |
@@ -144,3 +156,15 @@ void LLPanelNetwork::onCommitPort(LLUICtrl* ctrl, void* data) | |||
144 | self->childSetEnabled("connection_port", check->get()); | 156 | self->childSetEnabled("connection_port", check->get()); |
145 | LLNotifications::instance().add("ChangeConnectionPort"); | 157 | LLNotifications::instance().add("ChangeConnectionPort"); |
146 | } | 158 | } |
159 | |||
160 | // static | ||
161 | void LLPanelNetwork::onCommitXMLRPCProxyEnabled(LLUICtrl* ctrl, void* data) | ||
162 | { | ||
163 | LLPanelNetwork* self = (LLPanelNetwork*)data; | ||
164 | LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl; | ||
165 | |||
166 | if (!self || !check) return; | ||
167 | self->childSetEnabled("xmlrpc_proxy_editor", check->get()); | ||
168 | self->childSetEnabled("xmlrpc_proxy_port", check->get()); | ||
169 | self->childSetEnabled("xmlrpc_proxy_text_label", check->get()); | ||
170 | } \ No newline at end of file | ||