diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2017-02-03 16:47:26 -0500 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2017-02-03 16:47:26 -0500 |
| commit | 275d2e7e025eb7b3bfd8d924429e4bf9dbb26e66 (patch) | |
| tree | 7ca17b3a10e09b290a04e3ec857b79b2bc3f1ba0 /indra/llui/llfloater.cpp | |
| parent | df4957e3984ddf3f0183229175709e55f6b7880d (diff) | |
| parent | ead15a8ff5cfbfbb15f42c1f73910a3fa65d4741 (diff) | |
Automated merge with ssh://bitbucket.org/callum_linden/viewer64-xcode8
Diffstat (limited to 'indra/llui/llfloater.cpp')
| -rw-r--r-- | indra/llui/llfloater.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 4f664a1ccc..e0f2a12a27 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -64,8 +64,6 @@ // use this to control "jumping" behavior when Ctrl-Tabbing const S32 TABBED_FLOATER_OFFSET = 0; -extern LLControlGroup gSavedSettings; - namespace LLInitParam { void TypeValues<LLFloaterEnums::EOpenPositioning>::declareValues() @@ -653,13 +651,22 @@ void LLFloater::openFloater(const LLSD& key) && !getFloaterHost() && (!getVisible() || isMinimized())) { - //Don't play a sound for incoming voice call based upon chat preference setting - bool playSound = !(getName() == "incoming call" && gSavedSettings.getBOOL("PlaySoundIncomingVoiceCall") == FALSE); + // gSavedSettings is a global instance of LLControlGroup, but since + // LLControlGroup is derived from LLInstanceTracker, we can also look + // it up by name. + LLControlGroup* gSavedSettingsp = LLControlGroup::getInstance("Global"); + //Play a sound for incoming voice call based upon chat preference setting. + //If it's not an incoming call, play it anyway. + //If we can't find gSavedSettings, play it anyway. + //If the setting is ON, play it anyway. + bool playSound = (getName() != "incoming call" || + (! gSavedSettingsp) || + gSavedSettingsp->getBOOL("PlaySoundIncomingVoiceCall")); - if(playSound) - { - make_ui_sound("UISndWindowOpen"); - } + if(playSound) + { + make_ui_sound("UISndWindowOpen"); + } } //RN: for now, we don't allow rehosting from one multifloater to another |
