summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/llavatarlistitem.cpp11
-rw-r--r--indra/newview/llavatarlistitem.h1
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp63
-rw-r--r--indra/newview/lloutputmonitorctrl.h6
5 files changed, 38 insertions, 45 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 3e0de834b4..24fa0a0cd4 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -6909,7 +6909,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>1</integer>
+ <integer>0</integer>
</map>
<key>PluginAttachDebuggerToPlugins</key>
<map>
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 84e177d4a4..e52677925e 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -141,6 +141,17 @@ BOOL LLAvatarListItem::postBuild()
return TRUE;
}
+void LLAvatarListItem::handleVisibilityChange ( BOOL new_visibility )
+{
+ //Adjust positions of icons (info button etc) when
+ //speaking indicator visibility was changed/toggled while panel was closed (not visible)
+ if(new_visibility && mSpeakingIndicator->getIndicatorToggled())
+ {
+ updateChildren();
+ mSpeakingIndicator->setIndicatorToggled(false);
+ }
+}
+
void LLAvatarListItem::fetchAvatarName()
{
if (mAvatarNameCacheConnection.connected())
diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h
index 41853b6b51..96aed20016 100644
--- a/indra/newview/llavatarlistitem.h
+++ b/indra/newview/llavatarlistitem.h
@@ -84,6 +84,7 @@ public:
/**
* Processes notification from speaker indicator to update children when indicator's visibility is changed.
*/
+ virtual void handleVisibilityChange ( BOOL new_visibility );
virtual S32 notifyParent(const LLSD& info);
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index e4621a7fc3..02841e9831 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -73,8 +73,7 @@ LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p)
mAutoUpdate(p.auto_update),
mSpeakerId(p.speaker_id),
mIsAgentControl(false),
- mIsSwitchDirty(false),
- mShouldSwitchOn(false),
+ mIndicatorToggled(false),
mShowParticipantsSpeaking(false)
{
//static LLUIColor output_monitor_muted_color = LLUIColorTable::instance().getColor("OutputMonitorMutedColor", LLColor4::orange);
@@ -116,26 +115,6 @@ void LLOutputMonitorCtrl::setPower(F32 val)
void LLOutputMonitorCtrl::draw()
{
- // see also switchIndicator()
- if (mIsSwitchDirty)
- {
- mIsSwitchDirty = false;
- if (mShouldSwitchOn)
- {
- // just notify parent visibility may have changed
- notifyParentVisibilityChanged();
- }
- else
- {
- // make itself invisible and notify parent about this
- setVisible(FALSE);
- notifyParentVisibilityChanged();
-
- // no needs to render for invisible element
- return;
- }
- }
-
// Copied from llmediaremotectrl.cpp
// *TODO: Give the LLOutputMonitorCtrl an agent-id to monitor, then
// call directly into LLVoiceClient::getInstance() to ask if that agent-id is muted, is
@@ -323,26 +302,28 @@ void LLOutputMonitorCtrl::onChange()
// virtual
void LLOutputMonitorCtrl::switchIndicator(bool switch_on)
{
- // ensure indicator is visible in case it is not in visible chain
- // to be called when parent became visible next time to notify parent that visibility is changed.
- setVisible(TRUE);
-
- // if parent is in visible chain apply switch_on state and notify it immediately
- if (getParent() && getParent()->isInVisibleChain())
- {
- LL_DEBUGS("SpeakingIndicator") << "Indicator is in visible chain, notifying parent: " << mSpeakerId << LL_ENDL;
- setVisible((BOOL)switch_on);
- notifyParentVisibilityChanged();
- }
- // otherwise remember necessary state and mark itself as dirty.
- // State will be applied in next draw when parents chain becomes visible.
- else
- {
- LL_DEBUGS("SpeakingIndicator") << "Indicator is not in visible chain, parent won't be notified: " << mSpeakerId << LL_ENDL;
- mIsSwitchDirty = true;
- mShouldSwitchOn = switch_on;
- }
+ if(getVisible() != (BOOL)switch_on)
+ {
+ setVisible(switch_on);
+
+ //Let parent adjust positioning of icons adjacent to speaker indicator
+ //(when speaker indicator hidden, adjacent icons move to right and when speaker
+ //indicator visible, adjacent icons move to the left)
+ if (getParent() && getParent()->isInVisibleChain())
+ {
+ notifyParentVisibilityChanged();
+ //Ignore toggled state in case it was set when parent visibility was hidden
+ mIndicatorToggled = false;
+ }
+ else
+ {
+ //Makes sure to only adjust adjacent icons when parent becomes visible
+ //(!mIndicatorToggled ensures that changes of TFT and FTF are discarded, real state changes are TF or FT)
+ mIndicatorToggled = !mIndicatorToggled;
+ }
+
+ }
}
//////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h
index c3d3c35fd5..af2fd45823 100644
--- a/indra/newview/lloutputmonitorctrl.h
+++ b/indra/newview/lloutputmonitorctrl.h
@@ -108,6 +108,8 @@ public:
* It will be applied in next draw and parent will be notified.
*/
virtual void switchIndicator(bool switch_on);
+ bool getIndicatorToggled() { return mIndicatorToggled;}
+ void setIndicatorToggled(bool value) { mIndicatorToggled = value;}
private:
@@ -148,9 +150,7 @@ private:
/** uuid of a speaker being monitored */
LLUUID mSpeakerId;
- /** indicates if the instance is dirty and should notify parent */
- bool mIsSwitchDirty;
- bool mShouldSwitchOn;
+ bool mIndicatorToggled;
};
#endif