summaryrefslogtreecommitdiff
path: root/indra/newview/llstatusbar.cpp
diff options
context:
space:
mode:
authorVir Linden <60274682+vir-linden@users.noreply.github.com>2024-04-24 16:02:42 -0400
committerGitHub <noreply@github.com>2024-04-24 16:02:42 -0400
commita3602d660c89a10126946d9c789e454fbfbc34bd (patch)
tree1cd70015b45a432f599036f181dd93c53c59393a /indra/newview/llstatusbar.cpp
parent6ca4dfdb56d0107368a09af2b089c24d32e7108d (diff)
parentd98fc504a1d4bc292ba86acdda053c8b4598a193 (diff)
Merge pull request #1323 from secondlife/main
Update from main
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r--indra/newview/llstatusbar.cpp17
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() );