From 34558181c7fad95c235bca1e29c282ca09d136ba Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Tue, 11 Dec 2012 17:49:43 -0800 Subject: CHUI-545: Problem: Sometimes the speaker indicator icons were not visible in the conversations panel. Resolution: The problem was that the visibility was set incorrectly. When the speaking indicator was not in the visible chain the state of the visiblity would be stored in a pending variable. If the visiblity changed before the pending variable was used, then this meant the pending variable overrode the most recent visibiltiy changes. So as a solution, if the visiblity changes then prevent the pending visiblity from being used. --- indra/newview/lloutputmonitorctrl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index e4621a7fc3..27c552b626 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -333,7 +333,9 @@ void LLOutputMonitorCtrl::switchIndicator(bool switch_on) LL_DEBUGS("SpeakingIndicator") << "Indicator is in visible chain, notifying parent: " << mSpeakerId << LL_ENDL; setVisible((BOOL)switch_on); notifyParentVisibilityChanged(); - } + //Visibility has just been updated so make sure not to use the pending visibility when ::draw executes (if one is pending) + mIsSwitchDirty = false; + } // otherwise remember necessary state and mark itself as dirty. // State will be applied in next draw when parents chain becomes visible. -- cgit v1.2.3 From 89671fa1ad4ef13acb264d0e047fb24b9ee5d8a4 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Wed, 12 Dec 2012 16:59:57 -0800 Subject: CHUI-545: Adjusted fix because the old implementation of ::switchIndicator was not very clean and relied on the visiblity of the OutputMonitorCtrl to have a visibility of true even when it wasn't. The fix implemented makes it so that the visibility of OutputMonitorCtrl is always correct and the parent of this ctrl can use this information to adjust children adjacent to OutputMonitorCtrl. --- indra/newview/llavatarlistitem.cpp | 11 +++++++ indra/newview/llavatarlistitem.h | 1 + indra/newview/lloutputmonitorctrl.cpp | 61 +++++++++++------------------------ indra/newview/lloutputmonitorctrl.h | 6 ++-- 4 files changed, 34 insertions(+), 45 deletions(-) (limited to 'indra/newview') 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 27c552b626..88a52caf27 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,28 +302,26 @@ 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(); - //Visibility has just been updated so make sure not to use the pending visibility when ::draw executes (if one is pending) - mIsSwitchDirty = false; - } + 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(); + } + 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; + } - // 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; - } + } } ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h index 1fa6ef41f8..7671a736d6 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 -- cgit v1.2.3 From 37e95e837968935fba1744ec59b3fdd32b7034bf Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Wed, 12 Dec 2012 17:43:15 -0800 Subject: CHUI-545: Minor logic fix, inside ::switchIndicator(), make sure that in the case that the parent is visible and the parent makes the visibility changes...that mIndicatorToggled becomes false because the parent has already made the visiblity changes. --- indra/newview/lloutputmonitorctrl.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 88a52caf27..02841e9831 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -313,6 +313,8 @@ void LLOutputMonitorCtrl::switchIndicator(bool switch_on) if (getParent() && getParent()->isInVisibleChain()) { notifyParentVisibilityChanged(); + //Ignore toggled state in case it was set when parent visibility was hidden + mIndicatorToggled = false; } else { -- cgit v1.2.3 From b6f3c4d07e96f3529f048a93863aa9b0f28cbad4 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Wed, 12 Dec 2012 18:02:13 -0800 Subject: CHUI-526: Slight bug fix. Problem was that the 'Teleport Offer' sound was turn on by default when the user cleared their settings. Resolution: Inside settings.xml changed the PlaySoundTeleportOffer to no longer have an intial value of 1 (true). Now it is 0 (false). --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') 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 @@ Type Boolean Value - 1 + 0 PluginAttachDebuggerToPlugins -- cgit v1.2.3 From be6f3286f4a969a4de73d8f3af7b8262fe70bfb9 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Thu, 13 Dec 2012 18:43:52 +0200 Subject: Fixed path for correct assembly of the project --- indra/newview/llavatariconctrl.h | 2 +- indra/newview/llconversationmodel.h | 4 ++-- indra/newview/llconversationview.h | 4 ++-- indra/newview/llfloaterimcontainer.h | 6 +++--- indra/newview/llimview.h | 2 +- indra/newview/lloutputmonitorctrl.h | 4 ++-- indra/newview/llviewermenu.h | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavatariconctrl.h b/indra/newview/llavatariconctrl.h index f55967926a..4929efb7d0 100644 --- a/indra/newview/llavatariconctrl.h +++ b/indra/newview/llavatariconctrl.h @@ -29,7 +29,7 @@ #include -#include "lliconctrl.h" +#include "../llui/lliconctrl.h" #include "llavatarpropertiesprocessor.h" #include "llviewermenu.h" diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 7177d3a414..743a6ba40b 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -30,8 +30,8 @@ #include #include "llavatarname.h" -#include "llfolderviewitem.h" -#include "llfolderviewmodel.h" +#include "../llui/llfolderviewitem.h" +#include "../llui/llfolderviewmodel.h" #include "llviewerfoldertype.h" // Implementation of conversations list diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index a6f408403b..fb2834f26a 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -27,10 +27,10 @@ #ifndef LL_LLCONVERSATIONVIEW_H #define LL_LLCONVERSATIONVIEW_H -#include "llfolderviewitem.h" +#include "../llui/llfolderviewitem.h" #include "llavatariconctrl.h" -#include "llbutton.h" +#include "../llui/llbutton.h" #include "lloutputmonitorctrl.h" class LLTextBox; diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index 4f1bb96d9b..1a3e64f759 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -32,11 +32,11 @@ #include "llimview.h" #include "llevents.h" -#include "llfloater.h" -#include "llmultifloater.h" +#include "../llui/llfloater.h" +#include "../llui/llmultifloater.h" #include "llavatarpropertiesprocessor.h" #include "llgroupmgr.h" -#include "lltrans.h" +#include "../llui/lltrans.h" #include "llconversationmodel.h" #include "llconversationview.h" diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 19b738069c..9dbbd7738a 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -27,7 +27,7 @@ #ifndef LL_LLIMVIEW_H #define LL_LLIMVIEW_H -#include "lldockablefloater.h" +#include "../llui/lldockablefloater.h" #include "lleventtimer.h" #include "llinstantmessage.h" diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h index 1fa6ef41f8..c3d3c35fd5 100644 --- a/indra/newview/lloutputmonitorctrl.h +++ b/indra/newview/lloutputmonitorctrl.h @@ -28,10 +28,10 @@ #define LL_LLOUTPUTMONITORCTRL_H #include "v4color.h" -#include "llview.h" +#include "../llui/llview.h" #include "llmutelist.h" #include "llspeakingindicatormanager.h" -#include "lluiimage.h" +#include "../llui/lluiimage.h" class LLTextBox; class LLUICtrlFactory; diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 139f898b76..c0376ba114 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -27,7 +27,7 @@ #ifndef LL_LLVIEWERMENU_H #define LL_LLVIEWERMENU_H -#include "llmenugl.h" +#include "../llui/llmenugl.h" #include "llsafehandle.h" class LLMessageSystem; -- cgit v1.2.3