diff options
author | Merov Linden <merov@lindenlab.com> | 2013-02-23 11:24:59 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-02-23 11:24:59 -0800 |
commit | ed1945b06d49d2b4ebff5b9fe933675fdcf1e71f (patch) | |
tree | 8c03b3ba7f3f749a397e216cf95f20e4caf293e8 | |
parent | 7f51bd7897a3ced0edc74a32b9148febd7866721 (diff) | |
parent | 5284da1acee1c92f2d465088cee7488d5de2c8b3 (diff) |
Pull merge from lindenlab/vieewer-chui
-rwxr-xr-x | indra/newview/llconversationview.cpp | 50 | ||||
-rwxr-xr-x | indra/newview/llconversationview.h | 2 |
2 files changed, 38 insertions, 14 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 5ac6353daa..441de2e1a5 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -241,20 +241,23 @@ void LLConversationViewSession::draw() BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask ) { - LLConversationItem* item = dynamic_cast<LLConversationItem *>(getViewModelItem()); - LLUUID session_id = item? item->getUUID() : LLUUID(); - //Will try to select a child node and then itself (if a child was not selected) + //Will try to select a child node and then itself (if a child was not selected) BOOL result = LLFolderViewFolder::handleMouseDown(x, y, mask); //This node (conversation) was selected and a child (participant) was not - if(result && getRoot()->getCurSelectedItem() == this) - { - LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); - im_container->flashConversationItemWidget(session_id,false); - im_container->selectConversationPair(session_id, false); - im_container->collapseMessagesPane(false); - } - + if(result && getRoot()) + { + if(getRoot()->getCurSelectedItem() == this) + { + LLConversationItem* item = dynamic_cast<LLConversationItem *>(getViewModelItem()); + LLUUID session_id = item? item->getUUID() : LLUUID(); + + LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); + im_container->flashConversationItemWidget(session_id,false); + im_container->selectConversationPair(session_id, false); + im_container->collapseMessagesPane(false); + } + } return result; } @@ -375,7 +378,7 @@ void LLConversationViewSession::refresh() } } } - + requestArrange(); // Do the regular upstream refresh LLFolderViewFolder::refresh(); } @@ -536,7 +539,7 @@ void LLConversationViewParticipant::addToFolder(LLFolderViewFolder* folder) LLFolderViewItem::addToFolder(folder); // Retrieve the folder (conversation) UUID, which is also the speaker session UUID - LLConversationItem* vmi = this->getParentFolder() ? dynamic_cast<LLConversationItem*>(this->getParentFolder()->getViewModelItem()) : NULL; + LLConversationItem* vmi = getParentFolder() ? dynamic_cast<LLConversationItem*>(getParentFolder()->getViewModelItem()) : NULL; if (vmi) { addToSession(vmi->getUUID()); @@ -557,6 +560,27 @@ void LLConversationViewParticipant::onInfoBtnClick() LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mUUID)); } +BOOL LLConversationViewParticipant::handleMouseDown( S32 x, S32 y, MASK mask ) +{ + BOOL result = LLFolderViewItem::handleMouseDown(x, y, mask); + + if(result && getRoot()) + { + if(getRoot()->getCurSelectedItem() == this) + { + LLConversationItem* vmi = getParentFolder() ? dynamic_cast<LLConversationItem*>(getParentFolder()->getViewModelItem()) : NULL; + LLUUID session_id = vmi? vmi->getUUID() : LLUUID(); + + LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); + LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id); + im_container->flashConversationItemWidget(session_id,false); + im_container->selectFloater(session_floater); + im_container->collapseMessagesPane(false); + } + } + return result; +} + void LLConversationViewParticipant::onMouseEnter(S32 x, S32 y, MASK mask) { mInfoBtn->setVisible(true); diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index f2fa2fb042..f9b45073f4 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -138,7 +138,7 @@ public: void onMouseLeave(S32 x, S32 y, MASK mask); /*virtual*/ S32 getLabelXPos(); - + /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); void hideSpeakingIndicator(); protected: |