diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 22 | ||||
-rwxr-xr-x | indra/newview/llfloaterpreference.cpp | 81 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llxmlrpctransaction.cpp | 2 |
4 files changed, 41 insertions, 65 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f8b3001aa5..55bab3064f 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -840,28 +840,6 @@ <key>Value</key> <integer>1080</integer> </map> - <key>Socks5Username</key> - <map> - <key>Comment</key> - <string>Socks 5 Username</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>String</string> - <key>Value</key> - <string></string> - </map> - <key>Socks5Password</key> - <map> - <key>Comment</key> - <string>Socks 5 Password</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>String</string> - <key>Value</key> - <string></string> - </map> <key>Socks5AuthType</key> <map> <key>Comment</key> diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index ebdef8e38f..c49191748e 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -159,7 +159,7 @@ BOOL LLVoiceSetKeyDialog::handleKeyHere(KEY key, MASK mask) { BOOL result = TRUE; - if(key == 'Q' && mask == MASK_CONTROL) + if (key == 'Q' && mask == MASK_CONTROL) { result = FALSE; } @@ -459,7 +459,7 @@ BOOL LLFloaterPreference::postBuild() void LLFloaterPreference::onBusyResponseChanged() { // set "BusyResponseChanged" TRUE if user edited message differs from default, FALSE otherwise - if(LLTrans::getString("BusyModeResponseDefault") != getChild<LLUICtrl>("busy_response")->getValue().asString()) + if (LLTrans::getString("BusyModeResponseDefault") != getChild<LLUICtrl>("busy_response")->getValue().asString()) { gSavedPerAccountSettings.setBOOL("BusyResponseChanged", TRUE ); } @@ -541,7 +541,7 @@ void LLFloaterPreference::apply() LLViewerMedia::setCookiesEnabled(getChild<LLUICtrl>("cookies_enabled")->getValue()); - if(hasChild("web_proxy_enabled") &&hasChild("web_proxy_editor") && hasChild("web_proxy_port")) + if (hasChild("web_proxy_enabled") &&hasChild("web_proxy_editor") && hasChild("web_proxy_port")) { bool proxy_enable = getChild<LLUICtrl>("web_proxy_enabled")->getValue(); std::string proxy_address = getChild<LLUICtrl>("web_proxy_editor")->getValue(); @@ -554,13 +554,13 @@ void LLFloaterPreference::apply() gSavedSettings.setBOOL("PlainTextChatHistory", getChild<LLUICtrl>("plain_text_chat_history")->getValue().asBoolean()); - if(mGotPersonalInfo) + if (mGotPersonalInfo) { // gSavedSettings.setString("BusyModeResponse2", std::string(wstring_to_utf8str(busy_response))); bool new_im_via_email = getChild<LLUICtrl>("send_im_to_email")->getValue().asBoolean(); bool new_hide_online = getChild<LLUICtrl>("online_visibility")->getValue().asBoolean(); - if((new_im_via_email != mOriginalIMViaEmail) + if ((new_im_via_email != mOriginalIMViaEmail) ||(new_hide_online != mOriginalHideOnlineStatus)) { // This hack is because we are representing several different @@ -568,13 +568,13 @@ void LLFloaterPreference::apply() // can only select between 2 values, we represent it as a // checkbox. This breaks down a little bit for liaisons, but // works out in the end. - if(new_hide_online != mOriginalHideOnlineStatus) - { - if(new_hide_online) mDirectoryVisibility = VISIBILITY_HIDDEN; + if (new_hide_online != mOriginalHideOnlineStatus) + { + if (new_hide_online) mDirectoryVisibility = VISIBILITY_HIDDEN; else mDirectoryVisibility = VISIBILITY_DEFAULT; //Update showonline value, otherwise multiple applys won't work mOriginalHideOnlineStatus = new_hide_online; - } + } gAgent.sendAgentUpdateUserInfo(new_im_via_email,mDirectoryVisibility); } } @@ -618,12 +618,11 @@ void LLFloaterPreference::cancel() updateDoubleClickControls(); mDoubleClickActionDirty = false; } - LLFloaterPreferenceProxy * advanced_socks_settings = LLFloaterReg::findTypedInstance<LLFloaterPreferenceProxy>("prefs_socks5_advanced"); - if(advanced_socks_settings) - { - advanced_socks_settings->cancel(); - } - + LLFloaterPreferenceProxy * advanced_socks_settings = LLFloaterReg::findTypedInstance<LLFloaterPreferenceProxy>("prefs_socks5_advanced"); + if (advanced_socks_settings) + { + advanced_socks_settings->cancel(); + } } void LLFloaterPreference::onOpen(const LLSD& key) @@ -810,7 +809,7 @@ void LLFloaterPreference::onBtnCancel() void LLFloaterPreference::updateUserInfo(const std::string& visibility, bool im_via_email, const std::string& email) { LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences"); - if(instance) + if (instance) { instance->setPersonalInfo(visibility, im_via_email, email); } @@ -820,7 +819,7 @@ void LLFloaterPreference::updateUserInfo(const std::string& visibility, bool im_ void LLFloaterPreference::refreshEnabledGraphics() { LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences"); - if(instance) + if (instance) { instance->refresh(); //instance->refreshEnabledState(); @@ -1107,7 +1106,7 @@ void LLFloaterPreference::disableUnavailableSettings() LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF"); // if vertex shaders off, disable all shader related products - if(!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable")) + if (!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable")) { ctrl_shader_enable->setEnabled(FALSE); ctrl_shader_enable->setValue(FALSE); @@ -1138,7 +1137,7 @@ void LLFloaterPreference::disableUnavailableSettings() } // disabled windlight - if(!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders")) + if (!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders")) { ctrl_wind_light->setEnabled(FALSE); ctrl_wind_light->setValue(FALSE); @@ -1175,28 +1174,28 @@ void LLFloaterPreference::disableUnavailableSettings() } // disabled deferred SSAO - if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO")) + if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO")) { ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); } // disabled deferred shadows - if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail")) + if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail")) { ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); } // disabled reflections - if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionDetail")) + if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionDetail")) { ctrl_reflections->setEnabled(FALSE); ctrl_reflections->setValue(FALSE); } // disabled av - if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarVP")) + if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarVP")) { ctrl_avatar_vp->setEnabled(FALSE); ctrl_avatar_vp->setValue(FALSE); @@ -1219,14 +1218,14 @@ void LLFloaterPreference::disableUnavailableSettings() } // disabled cloth - if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarCloth")) + if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarCloth")) { ctrl_avatar_cloth->setEnabled(FALSE); ctrl_avatar_cloth->setValue(FALSE); } // disabled impostors - if(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseImpostors")) + if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseImpostors")) { ctrl_avatar_impostors->setEnabled(FALSE); ctrl_avatar_impostors->setValue(FALSE); @@ -1392,12 +1391,12 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im mOriginalIMViaEmail = im_via_email; mDirectoryVisibility = visibility; - if(visibility == VISIBILITY_DEFAULT) + if (visibility == VISIBILITY_DEFAULT) { mOriginalHideOnlineStatus = false; getChildView("online_visibility")->setEnabled(TRUE); } - else if(visibility == VISIBILITY_HIDDEN) + else if (visibility == VISIBILITY_HIDDEN) { mOriginalHideOnlineStatus = true; getChildView("online_visibility")->setEnabled(TRUE); @@ -1445,7 +1444,7 @@ void LLFloaterPreference::onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name) { std::string ctrl_name = name.asString(); - if((ctrl_name =="" )|| !hasChild(ctrl_name, true)) + if ((ctrl_name =="" )|| !hasChild(ctrl_name, true)) return; LLTextBox* text_box = getChild<LLTextBox>(name.asString()); @@ -1455,7 +1454,7 @@ void LLFloaterPreference::onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name) void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box) { - if(text_box == NULL || ctrl== NULL) + if (text_box == NULL || ctrl== NULL) return; // get range and points when text should change @@ -1468,7 +1467,7 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b F32 highPoint = min + (2.0f * range / 3.0f); // choose the right text - if(value < midPoint) + if (value < midPoint) { text_box->setText(LLTrans::getString("GraphicsQualityLow")); } @@ -1653,7 +1652,7 @@ BOOL LLPanelPreference::postBuild() { ////////////////////// PanelVoice /////////////////// - if(hasChild("voice_unavailable")) + if (hasChild("voice_unavailable")) { BOOL voice_disabled = gSavedSettings.getBOOL("CmdLineDisableVoice"); getChildView("voice_unavailable")->setVisible( voice_disabled); @@ -1675,7 +1674,7 @@ BOOL LLPanelPreference::postBuild() } - if(hasChild("online_visibility") && hasChild("send_im_to_email")) + if (hasChild("online_visibility") && hasChild("send_im_to_email")) { getChild<LLUICtrl>("email_address")->setValue(getString("log_in_to_change") ); // getChild<LLUICtrl>("busy_response")->setValue(getString("log_in_to_change")); @@ -1804,7 +1803,7 @@ void LLPanelPreference::cancel() iter != mSavedColors.end(); ++iter) { LLColorSwatchCtrl* color_swatch = findChild<LLColorSwatchCtrl>(iter->first); - if(color_swatch) + if (color_swatch) { color_swatch->set(iter->second); color_swatch->onCommit(); @@ -1848,7 +1847,7 @@ void LLPanelPreferenceGraphics::draw() LLButton* button_apply = findChild<LLButton>("Apply"); - if(button_apply && button_apply->getVisible()) + if (button_apply && button_apply->getVisible()) { bool enable = hasDirtyChilds(); @@ -1868,7 +1867,7 @@ bool LLPanelPreferenceGraphics::hasDirtyChilds() LLUICtrl* ctrl = dynamic_cast<LLUICtrl*>(curview); if (ctrl) { - if(ctrl->isDirty()) + if (ctrl->isDirty()) return true; } // Push children onto the end of the work stack @@ -1941,7 +1940,7 @@ LLFloaterPreferenceProxy::~LLFloaterPreferenceProxy() BOOL LLFloaterPreferenceProxy::postBuild() { LLRadioGroup* socksAuth = getChild<LLRadioGroup>("socks5_auth_type"); - if(socksAuth->getSelectedValue().asString() == "None") + if (socksAuth->getSelectedValue().asString() == "None") { getChild<LLLineEditor>("socks5_username")->setEnabled(false); getChild<LLLineEditor>("socks5_password")->setEnabled(false); @@ -1965,12 +1964,12 @@ void LLFloaterPreferenceProxy::onOpen(const LLSD& key) void LLFloaterPreferenceProxy::onClose(bool app_quitting) { - if(mSocksSettingsDirty) + if (mSocksSettingsDirty) { // If the user plays with the Socks proxy settings after login, it's only fair we let them know // it will not be updated until next restart. - if(LLStartUp::getStartupState()>STATE_LOGIN_WAIT) + if (LLStartUp::getStartupState()>STATE_LOGIN_WAIT) { LLNotifications::instance().add("ChangeSocks5Settings", LLSD(), LLSD()); mSocksSettingsDirty = false; // we have notified the user now be quiet again @@ -2023,7 +2022,7 @@ void LLFloaterPreferenceProxy::onBtnOk() // Save SOCKS proxy credentials securely if password auth is enabled LLRadioGroup* socksAuth = getChild<LLRadioGroup>("socks5_auth_type"); - if(socksAuth->getSelectedValue().asString() == "UserPass") + if (socksAuth->getSelectedValue().asString() == "UserPass") { LLSD socks_id = LLSD::emptyMap(); socks_id["type"] = "SOCKS5"; @@ -2080,7 +2079,7 @@ void LLFloaterPreferenceProxy::onChangeSocksSettings() mSocksSettingsDirty = true; LLRadioGroup* socksAuth = getChild<LLRadioGroup>("socks5_auth_type"); - if(socksAuth->getSelectedValue().asString() == "None") + if (socksAuth->getSelectedValue().asString() == "None") { getChild<LLLineEditor>("socks5_username")->setEnabled(false); getChild<LLLineEditor>("socks5_password")->setEnabled(false); @@ -2093,7 +2092,7 @@ void LLFloaterPreferenceProxy::onChangeSocksSettings() // Check for invalid states for the other HTTP proxy radio LLRadioGroup* otherHttpProxy = getChild<LLRadioGroup>("other_http_proxy_selection"); - if( (otherHttpProxy->getSelectedValue().asString() == "Socks" && + if ((otherHttpProxy->getSelectedValue().asString() == "Socks" && getChild<LLCheckBoxCtrl>("socks_proxy_enabled")->get() == FALSE )||( otherHttpProxy->getSelectedValue().asString() == "Web" && getChild<LLCheckBoxCtrl>("web_proxy_enabled")->get() == FALSE ) ) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 3661155e88..1fe241a8ce 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2827,7 +2827,6 @@ bool LLStartUp::handleSocksProxy() // If status != SOCKS_OK, stopProxy() will already have been called when startProxy() returns. int status = LLProxy::getInstance()->startProxy(gSavedSettings.getString("Socks5ProxyHost"), gSavedSettings.getU32("Socks5ProxyPort")); LLSD subs; - LLSD payload; subs["HOST"] = gSavedSettings.getString("Socks5ProxyHost"); subs["PORT"] = (S32)gSavedSettings.getU32("Socks5ProxyPort"); diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index ef6763a5d1..c88e829527 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -318,7 +318,7 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) if (LLProxy::getInstance()->getHTTPProxyType() == LLPROXY_SOCKS) { mCurlRequest->setopt(CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); - if(LLProxy::getInstance()->getSelectedAuthMethod()==METHOD_PASSWORD) + if (LLProxy::getInstance()->getSelectedAuthMethod()==METHOD_PASSWORD) { mCurlRequest->setoptString(CURLOPT_PROXYUSERPWD,LLProxy::getInstance()->getProxyUserPwdCURL()); } |