diff options
author | maksymsproductengine <maksymsproductengine@lindenlab.com> | 2012-11-06 22:02:09 +0200 |
---|---|---|
committer | maksymsproductengine <maksymsproductengine@lindenlab.com> | 2012-11-06 22:02:09 +0200 |
commit | 8828eb21e2a8960bbcfd4edb2d113dbada7d4a5d (patch) | |
tree | 2c8bc1b6ea18d47b2e3c153f92ae4c7f4b27a8a2 /indra/newview | |
parent | a337d7e59776f0ae6ecf72f67c813c9c60cfd8c7 (diff) |
CHUI-448 FIXED p2p IM chat conversations show a participant list with a carat
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llconversationview.cpp | 9 | ||||
-rwxr-xr-x | indra/newview/llconversationview.h | 2 | ||||
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 41 |
3 files changed, 37 insertions, 15 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 0f649361fb..2d3a008bf4 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -344,6 +344,15 @@ void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& sessi } } +void LLConversationViewSession::drawOpenFolderArrow(const LLFolderViewItem::Params& default_params, const LLUIColor& fg_color) +{ + LLConversationItem * itemp = dynamic_cast<LLConversationItem*>(getViewModelItem()); + if (itemp && itemp->getType() != LLConversationItem::CONV_SESSION_1_ON_1) + { + LLFolderViewFolder::drawOpenFolderArrow(default_params, fg_color); + } +} + // // Implementation of conversations list participant (avatar) widgets // diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 4d77a4ade0..aeca747260 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -71,6 +71,8 @@ public: /*virtual*/ bool isMinimized() { return mMinimizedMode; } + /*virtual*/ void drawOpenFolderArrow(const LLFolderViewItem::Params& default_params, const LLUIColor& fg_color); + void toggleMinimizedMode(bool is_minimized); void setVisibleIfDetached(BOOL visible); diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 52deae445b..af43b1ac38 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -424,15 +424,21 @@ bool LLIMFloaterContainer::onConversationModelEvent(const LLSD& event) LLConversationItemSession* session_model = dynamic_cast<LLConversationItemSession*>(mConversationsItems[session_id]); if (session_model) { - LLConversationItemParticipant* participant_model = session_model->findParticipant(participant_id); - if (participant_model) + const LLUUID& uuid = session_model->getUUID(); + + LLIMModel::LLIMSession * im_sessionp = LLIMModel::getInstance()->findIMSession(uuid); + + if (uuid.isNull() || im_sessionp && !im_sessionp->isP2PSessionType()) { - participant_view = createConversationViewParticipant(participant_model); - participant_view->addToFolder(session_view); - participant_view->setVisible(TRUE); + LLConversationItemParticipant* participant_model = session_model->findParticipant(participant_id); + if (participant_model) + { + participant_view = createConversationViewParticipant(participant_model); + participant_view->addToFolder(session_view); + participant_view->setVisible(TRUE); + } } } - } } else if (type == "update_participant") @@ -1175,17 +1181,22 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid, bool isWi // Add a new conversation widget to the root folder of the folder view widget->addToFolder(mConversationsRoot); widget->requestArrange(); - + + LLIMModel::LLIMSession * im_sessionp = LLIMModel::getInstance()->findIMSession(uuid); + // Create the participants widgets now // Note: usually, we do not get an updated avatar list at that point - LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = item->getChildrenBegin(); - LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = item->getChildrenEnd(); - while (current_participant_model != end_participant_model) - { - LLConversationItem* participant_model = dynamic_cast<LLConversationItem*>(*current_participant_model); - LLConversationViewParticipant* participant_view = createConversationViewParticipant(participant_model); - participant_view->addToFolder(widget); - current_participant_model++; + if (uuid.isNull() || im_sessionp && !im_sessionp->isP2PSessionType()) + { + LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = item->getChildrenBegin(); + LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = item->getChildrenEnd(); + while (current_participant_model != end_participant_model) + { + LLConversationItem* participant_model = dynamic_cast<LLConversationItem*>(*current_participant_model); + LLConversationViewParticipant* participant_view = createConversationViewParticipant(participant_model); + participant_view->addToFolder(widget); + current_participant_model++; + } } // set the widget to minimized mode if conversations pane is collapsed |