diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-12 17:05:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-12 17:05:23 +0300 |
commit | 9bc190c8d3ddd7a692636bb349952144fd511622 (patch) | |
tree | 07b0a9297a67667b5c85c4eb4950628e344c5106 /indra/newview/llstatusbar.cpp | |
parent | f5a7fba76a24a96f906abcbd928f37e4eabfa76c (diff) | |
parent | eab5beb54cacc2b0dc2cddad4a78634e7468a298 (diff) |
Merge pull request #1211 from secondlife/marchcat/x-merge
Release (Maint W) -> Maint X merge
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r-- | indra/newview/llstatusbar.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 1ef5d1c50b..5bd203cb65 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -190,6 +190,13 @@ BOOL LLStatusBar::postBuild() LLHints::getInstance()->registerHintTarget("linden_balance", getChild<LLView>("balance_bg")->getHandle()); gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2)); + gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLStatusBar::onVoiceChanged, this, _2)); + + if (!gSavedSettings.getBOOL("EnableVoiceChat") && LLAppViewer::instance()->isSecondInstance()) + { + // Indicate that second instance started without sound + mBtnVolume->setImageUnselected(LLUI::getUIImage("VoiceMute_Off")); + } // Adding Net Stat Graph S32 x = getRect().getWidth() - 2; @@ -640,6 +647,16 @@ void LLStatusBar::onVolumeChanged(const LLSD& newvalue) refresh(); } +void LLStatusBar::onVoiceChanged(const LLSD& newvalue) +{ + if (newvalue.asBoolean()) + { + // Second instance starts with "VoiceMute_Off" icon, fix it + mBtnVolume->setImageUnselected(LLUI::getUIImage("Audio_Off")); + } + refresh(); +} + void LLStatusBar::onUpdateFilterTerm() { LLWString searchValue = utf8str_to_wstring( mFilterEdit->getValue() ); |