summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llconversationview.cpp')
-rwxr-xr-xindra/newview/llconversationview.cpp31
1 files changed, 24 insertions, 7 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 34b5976e3e..ac5b2ad6ac 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -108,7 +108,7 @@ BOOL LLConversationViewSession::postBuild()
mSessionTitle = mItemPanel->getChild<LLTextBox>("conversation_title");
mActiveVoiceChannelConnection = LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLConversationViewSession::onCurrentVoiceSessionChanged, this, _1));
- mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicatorn");
+ mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator");
LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(getViewModelItem());
if (vmi)
@@ -244,7 +244,6 @@ void LLConversationViewSession::toggleOpen()
}
}
-
void LLConversationViewSession::toggleMinimizedMode(bool is_minimized)
{
mMinimizedMode = is_minimized;
@@ -261,8 +260,9 @@ void LLConversationViewSession::setVisibleIfDetached(BOOL visible)
{
// Do this only if the conversation floater has been torn off (i.e. no multi floater host) and is not minimized
// Note: minimized dockable floaters are brought to front hence unminimized when made visible and we don't want that here
- LLConversationItem* item = dynamic_cast<LLConversationItem*>(mViewModelItem);
- LLFloater* session_floater = LLIMConversation::getConversation(item->getUUID());
+ LLFolderViewModelItem* item = mViewModelItem;
+ LLUUID session_uuid = dynamic_cast<LLConversationItem*>(item)->getUUID();
+ LLFloater* session_floater = LLIMConversation::getConversation(session_uuid);
if (session_floater && !session_floater->getHost() && !session_floater->isMinimized())
{
@@ -429,13 +429,30 @@ void LLConversationViewParticipant::draw()
LLView::draw();
}
+// virtual
+S32 LLConversationViewParticipant::arrange(S32* width, S32* height)
+{
+ //Need to call arrange first since it computes value used in getIndentation()
+ S32 arranged = LLFolderViewItem::arrange(width, height);
+
+ //Adjusts the avatar icon based upon the indentation
+ LLRect avatarRect(getIndentation(),
+ mAvatarIcon->getRect().mTop,
+ getIndentation() + mAvatarIcon->getRect().getWidth(),
+ mAvatarIcon->getRect().mBottom);
+ mAvatarIcon->setShape(avatarRect);
+
+ return arranged;
+}
+
void LLConversationViewParticipant::refresh()
{
// Refresh the participant view from its model data
- LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(getViewModelItem());
+ LLConversationItemParticipant* vmi = dynamic_cast<LLConversationItemParticipant*>(getViewModelItem());
vmi->resetRefresh();
- // Note: for the moment, all that needs to be done is done by LLFolderViewItem::refresh()
+ // *TODO: We should also do something with vmi->isModerator() to echo that state in the UI somewhat
+ mSpeakingIndicator->setIsMuted(vmi->isMuted());
// Do the regular upstream refresh
LLFolderViewItem::refresh();
@@ -496,7 +513,7 @@ BOOL LLConversationViewParticipant::handleMouseDown( S32 x, S32 y, MASK mask )
S32 LLConversationViewParticipant::getLabelXPos()
{
- return mAvatarIcon->getRect().mRight + mIconPad;
+ return getIndentation() + mAvatarIcon->getRect().getWidth() + mIconPad;
}
// static