diff options
author | McCabe Maxsted | 2011-04-12 18:52:06 -0700 |
---|---|---|
committer | McCabe Maxsted | 2011-04-12 18:52:42 -0700 |
commit | 976433ef4fdf81f44b2ec82344ff4fe2968eae08 (patch) | |
tree | 4c54bb371129a77ea1695f0458cf2e71852e8c21 | |
parent | Tidied up the label names for socks 5 (diff) | |
download | meta-impy-976433ef4fdf81f44b2ec82344ff4fe2968eae08.zip meta-impy-976433ef4fdf81f44b2ec82344ff4fe2968eae08.tar.gz meta-impy-976433ef4fdf81f44b2ec82344ff4fe2968eae08.tar.bz2 meta-impy-976433ef4fdf81f44b2ec82344ff4fe2968eae08.tar.xz |
Make sure users can't enable both SOCKS 5 proxies and XMLRPC proxies at the same time (also fixes a SOCKS 5 preference not getting disabled). These prefs are extra-confusing right now, but will get sorted out in a bit
-rw-r--r-- | linden/indra/newview/llpanelnetwork.cpp | 26 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml | 2 |
2 files changed, 18 insertions, 10 deletions
diff --git a/linden/indra/newview/llpanelnetwork.cpp b/linden/indra/newview/llpanelnetwork.cpp index a371962..3b866eb 100644 --- a/linden/indra/newview/llpanelnetwork.cpp +++ b/linden/indra/newview/llpanelnetwork.cpp | |||
@@ -218,6 +218,8 @@ void LLPanelNetwork::onCommitXMLRPCProxyEnabled(LLUICtrl* ctrl, void* data) | |||
218 | self->childSetEnabled("xmlrpc_proxy_editor", check->get()); | 218 | self->childSetEnabled("xmlrpc_proxy_editor", check->get()); |
219 | self->childSetEnabled("xmlrpc_proxy_port", check->get()); | 219 | self->childSetEnabled("xmlrpc_proxy_port", check->get()); |
220 | self->childSetEnabled("xmlrpc_proxy_text_label", check->get()); | 220 | self->childSetEnabled("xmlrpc_proxy_text_label", check->get()); |
221 | |||
222 | self->childSetEnabled("socks5_proxy_enabled", !check->get()); | ||
221 | } | 223 | } |
222 | 224 | ||
223 | // static | 225 | // static |
@@ -258,13 +260,13 @@ void LLPanelNetwork::updateProxyEnabled(LLPanelNetwork * self, bool enabled, std | |||
258 | // to avoid code duplication | 260 | // to avoid code duplication |
259 | 261 | ||
260 | // Update all socks labels and controls except auth specific ones | 262 | // Update all socks labels and controls except auth specific ones |
261 | self->childSetEnabled("socks5_proxy_port", enabled); | 263 | self->childSetEnabled("socks5_proxy_port", enabled); |
262 | self->childSetEnabled("socks5_proxy_host", enabled); | 264 | self->childSetEnabled("socks5_proxy_host", enabled); |
263 | self->childSetEnabled("socks5_host_label", enabled); | 265 | self->childSetEnabled("socks5_host_label", enabled); |
264 | self->childSetEnabled("socks5_proxy_label", enabled); | 266 | self->childSetEnabled("socks5_proxy_label", enabled); |
265 | self->childSetEnabled("socks5_proxy_port", enabled); | 267 | self->childSetEnabled("socks5_proxy_port", enabled); |
266 | self->childSetEnabled("socks5_auth_label", enabled); | 268 | self->childSetEnabled("socks5_auth_label", enabled); |
267 | self->childSetEnabled("socks5_auth", enabled); | 269 | self->childSetEnabled("socks5_auth", enabled); |
268 | 270 | ||
269 | // disable the web option if the web proxy has not been configured | 271 | // disable the web option if the web proxy has not been configured |
270 | // this is still not ideal as apply or ok is needed for this to be saved to the preferences | 272 | // this is still not ideal as apply or ok is needed for this to be saved to the preferences |
@@ -272,7 +274,7 @@ void LLPanelNetwork::updateProxyEnabled(LLPanelNetwork * self, bool enabled, std | |||
272 | 274 | ||
273 | self->childSetEnabled("Socks", enabled); | 275 | self->childSetEnabled("Socks", enabled); |
274 | 276 | ||
275 | // Hide the auth specific lables if authtype is none or | 277 | // Hide the auth specific labels if authtype is none or |
276 | // we are not enabled. | 278 | // we are not enabled. |
277 | if ((authtype.compare("None") == 0) || (enabled == false)) | 279 | if ((authtype.compare("None") == 0) || (enabled == false)) |
278 | { | 280 | { |
@@ -283,7 +285,7 @@ void LLPanelNetwork::updateProxyEnabled(LLPanelNetwork * self, bool enabled, std | |||
283 | } | 285 | } |
284 | 286 | ||
285 | // Only show the username and password boxes if we are enabled | 287 | // Only show the username and password boxes if we are enabled |
286 | // and authtype is username pasword. | 288 | // and authtype is username password. |
287 | if ((authtype.compare("UserPass") == 0) && (enabled == true)) | 289 | if ((authtype.compare("UserPass") == 0) && (enabled == true)) |
288 | { | 290 | { |
289 | self->childSetEnabled("socks5_username_label", true); | 291 | self->childSetEnabled("socks5_username_label", true); |
@@ -291,4 +293,10 @@ void LLPanelNetwork::updateProxyEnabled(LLPanelNetwork * self, bool enabled, std | |||
291 | self->childSetEnabled("socks5_proxy_username", true); | 293 | self->childSetEnabled("socks5_proxy_username", true); |
292 | self->childSetEnabled("socks5_proxy_password", true); | 294 | self->childSetEnabled("socks5_proxy_password", true); |
293 | } | 295 | } |
296 | |||
297 | // Disable the XMLRPC proxy if it's enabled and we enable SOCKS5 | ||
298 | self->childSetEnabled("xmlrpc_proxy_enabled", !enabled); | ||
299 | self->childSetEnabled("xmlrpc_proxy_editor", !enabled); | ||
300 | self->childSetEnabled("xmlrpc_proxy_port", !enabled); | ||
301 | self->childSetEnabled("xmlrpc_proxy_text_label", !enabled); | ||
294 | } | 302 | } |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml index 05bd995..76683cd 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml | |||
@@ -155,7 +155,7 @@ | |||
155 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 155 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
156 | bottom_delta="-20" drop_shadow_visible="true" enabled="true" | 156 | bottom_delta="-20" drop_shadow_visible="true" enabled="true" |
157 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | 157 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" |
158 | height="10" left="35" mouse_opaque="false" name="socks5_auth_label" | 158 | height="10" left="35" mouse_opaque="false" name="http_proxy_label" |
159 | v_pad="0" width="128"> | 159 | v_pad="0" width="128"> |
160 | HTTP proxy: | 160 | HTTP proxy: |
161 | </text> | 161 | </text> |