diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 1680326d9e54a6b12b64be7da09f58c24e22b4a3..6c7342f209affddabf389881e68f3ee3b098c88a 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -293,7 +293,8 @@ void LLPanelPermissions::refresh() if(BtnDeedToGroup) { std::string deedText; - if (gWarningSettings.getBOOL("DeedObject")) + static const LLCachedControl<bool> deed_object(gWarningSettings, "DeedObject"); + if (deed_object) { deedText = getString("text deed continued"); } diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index a6000e6844fdc5c8e5ebe787977a372a64eab11c..33c291243ec9bb20b24d662dfe364c09e526fd94 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -261,7 +261,8 @@ void LLSidepanelTaskInfo::refresh() if (btn_deed_to_group) { std::string deedText; - if (gWarningSettings.getBOOL("DeedObject")) + static const LLCachedControl<bool> deed_object(gWarningSettings, "DeedObject"); + if (deed_object) { deedText = getString("text deed continued"); } diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 218e35dd3fe066572496acee8f99e48e2398ac0d..61a88085756ab439a514d6ed4d144792e4a337cf 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1167,6 +1167,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l ( (RlvActions::canInteract(hover_object, mHoverPick.mObjectOffset)) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, hover_object->getID())) ) ) { // [/RLVa:KB] + static const LLCachedControl<bool> av_inspector_tooltip_delay(gSavedSettings, "AvatarInspectorTooltipDelay"); LLInspector::Params p; p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>()); p.message(final_name); @@ -1174,7 +1175,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l p.click_callback(boost::bind(showAvatarInspector, hover_object->getID())); p.visible_time_near(6.f); p.visible_time_far(3.f); - p.delay_time(gSavedSettings.getF32("AvatarInspectorTooltipDelay")); + p.delay_time(av_inspector_tooltip_delay); p.wrap(false); LLToolTipMgr::instance().show(p); diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index 5a442eb4bc99549c942b46cbf43dcfe6ab1949c7..952c80ad40f1fc732339a2789465b38b753c4ea3 100644 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -112,13 +112,14 @@ static void agent_check_temporary_run(LLAgent::EDoubleTapRunMode mode) static void agent_handle_doubletap_run(EKeystate s, LLAgent::EDoubleTapRunMode mode) { + static LLCachedControl<bool> allow_tap_hold_run(gSavedSettings, "AllowTapTapHoldRun", true); if (KEYSTATE_UP == s) { // Note: in case shift is already released, slide left/right run // will be released in agent_turn_left()/agent_turn_right() agent_check_temporary_run(mode); } - else if (gSavedSettings.getBOOL("AllowTapTapHoldRun") && + else if (allow_tap_hold_run && KEYSTATE_DOWN == s && !gAgent.getRunning()) { diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ccb6e4d5f2aadd4ead2fbbcc61add742bc3885ec..6eab4020cb2cd41d90a785358426be88bba5b6ed 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2908,7 +2908,8 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // If "Pressing letter keys starts local chat" option is selected, we are not in mouselook, // no view has keyboard focus, this is a printable character key (and no modifier key is // pressed except shift), then give focus to nearby chat (STORM-560) - if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() && + static const LLCachedControl<S32> letter_keys_Focus_chat_bar(gSavedSettings, "LetterKeysFocusChatBar"); + if (letter_keys_Focus_chat_bar && !gAgentCamera.cameraMouselook() && !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) ) { // Initialize nearby chat if it's missing @@ -3109,7 +3110,8 @@ void LLViewerWindow::clearPopups() void LLViewerWindow::moveCursorToCenter() { - if (! gSavedSettings.getBOOL("DisableMouseWarp")) + static LLCachedControl<bool> disable_mouse_warp(gSavedSettings, "DisableMouseWarp"); + if (!disable_mouse_warp) { S32 x = getWorldViewWidthScaled() / 2; S32 y = getWorldViewHeightScaled() / 2; diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 3b9fce9d122e722f58ad6febd3d1cc37d883f612..edb2e922c821ef15297071bd177e31152c674a5d 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -5171,7 +5171,9 @@ void LLVivoxVoiceClient::setVoiceEnabled(bool enabled) bool LLVivoxVoiceClient::voiceEnabled() { - return gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice"); + static const LLCachedControl<bool> enable_voice_chat(gSavedSettings, "EnableVoiceChat"); + static const LLCachedControl<bool> cmd_line_disable_voice(gSavedSettings, "CmdLineDisableVoice"); + return enable_voice_chat && !cmd_line_disable_voice; } void LLVivoxVoiceClient::setLipSyncEnabled(BOOL enabled)