From 724b6a8c64dab8bb3586b3273e51d7502ac44749 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 4 Aug 2023 19:47:22 +0300 Subject: SL-18049 Part 5; Tweak new icon visibility --- indra/newview/llstatusbar.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'indra/newview/llstatusbar.cpp') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 0145380712..836a4327bf 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -66,7 +66,6 @@ #include "llviewermenu.h" // for gMenuBarView #include "llviewerparcelmgr.h" #include "llviewerthrottle.h" -#include "llvoiceclient.h" #include "lluictrlfactory.h" #include "lltoolmgr.h" @@ -193,12 +192,9 @@ BOOL LLStatusBar::postBuild() 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")) - { - mBtnVolume->setImageUnselected(LLUI::getUIImage("Audio_Off")); - } - else + if (!gSavedSettings.getBOOL("EnableVoiceChat") && LLAppViewer::instance()->isSecondInstance()) { + // Indicate that second instance started without sound mBtnVolume->setImageUnselected(LLUI::getUIImage("VoiceMute_Off")); } @@ -655,12 +651,9 @@ void LLStatusBar::onVoiceChanged(const LLSD& newvalue) { if (newvalue.asBoolean()) { + // Second instance starts with "VoiceMute_Off" icon, fix it mBtnVolume->setImageUnselected(LLUI::getUIImage("Audio_Off")); } - else - { - mBtnVolume->setImageUnselected(LLUI::getUIImage("VoiceMute_Off")); - } refresh(); } -- cgit v1.2.3