From a2c08d8e86a46fe37006a8086c56866445e57bf3 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Mon, 11 Jan 2010 16:59:28 +0000 Subject: EXT-3429: Don't display inspect slider when inappropriate. The avatar inspector has a volume slider and mute button. We make these widgets invisible when it does not makes sense to interact with them. That is, when the inspector is for your own avatar, or when voice is not active. --- indra/newview/llinspectavatar.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 72994a4371..a2b3a54f51 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -278,7 +278,7 @@ void LLInspectAvatar::onOpen(const LLSD& data) getChild("gear_self_btn")->setVisible(self); getChild("gear_btn")->setVisible(!self); - + // Position the inspector relative to the mouse cursor // Similar to how tooltips are positioned // See LLToolTipMgr::createToolTip @@ -518,13 +518,17 @@ void LLInspectAvatar::updateVolumeSlider() bool is_muted = LLMuteList::getInstance()-> isMuted(mAvatarID, LLMute::flagVoiceChat); bool voice_enabled = gVoiceClient->getVoiceEnabled(mAvatarID); + bool is_self = (mAvatarID == gAgent.getID()); LLUICtrl* mute_btn = getChild("mute_btn"); mute_btn->setEnabled( voice_enabled ); mute_btn->setValue( is_muted ); + mute_btn->setVisible( voice_enabled && !is_self ); LLUICtrl* volume_slider = getChild("volume_slider"); volume_slider->setEnabled( voice_enabled && !is_muted ); + volume_slider->setVisible( voice_enabled && !is_self ); + const F32 DEFAULT_VOLUME = 0.5f; F32 volume; if (is_muted) -- cgit v1.2.3