Pull and merge from ssh://stinson@hg.lindenlab.com/richard/viewer-chui/.
commit
fa822a2ae5
|
|
@ -6909,7 +6909,7 @@
|
|||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>PluginAttachDebuggerToPlugins</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
#include "lliconctrl.h"
|
||||
#include "../llui/lliconctrl.h"
|
||||
#include "llavatarpropertiesprocessor.h"
|
||||
#include "llviewermenu.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@
|
|||
#include <boost/signals2.hpp>
|
||||
|
||||
#include "llavatarname.h"
|
||||
#include "llfolderviewitem.h"
|
||||
#include "llfolderviewmodel.h"
|
||||
#include "../llui/llfolderviewitem.h"
|
||||
#include "../llui/llfolderviewmodel.h"
|
||||
#include "llviewerfoldertype.h"
|
||||
|
||||
// Implementation of conversations list
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#ifndef LL_LLVIEWERMENU_H
|
||||
#define LL_LLVIEWERMENU_H
|
||||
|
||||
#include "llmenugl.h"
|
||||
#include "../llui/llmenugl.h"
|
||||
#include "llsafehandle.h"
|
||||
|
||||
class LLMessageSystem;
|
||||
|
|
|
|||
Loading…
Reference in New Issue