From 622a697788e3cabb9e803226de72856e9189911f Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 6 Nov 2012 14:47:01 +0200 Subject: CHUI-460 FIXED Reselect current conversation on clicking expand/collapse button --- indra/newview/llimfloatercontainer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llimfloatercontainer.cpp') diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index f85aa9a353..52deae445b 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -331,6 +331,7 @@ void LLIMFloaterContainer::onExpandCollapseButtonClicked() { collapseConversationsPane(!mConversationsPane->isCollapsed()); } + selectConversation(mSelectedSession); } LLIMFloaterContainer* LLIMFloaterContainer::findInstance() -- cgit v1.2.3 From 8828eb21e2a8960bbcfd4edb2d113dbada7d4a5d Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Tue, 6 Nov 2012 22:02:09 +0200 Subject: CHUI-448 FIXED p2p IM chat conversations show a participant list with a carat --- indra/newview/llimfloatercontainer.cpp | 41 +++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 15 deletions(-) (limited to 'indra/newview/llimfloatercontainer.cpp') 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(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(*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(*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 -- cgit v1.2.3 From d1f45654d91762af4e614de2156304d7acad6619 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Wed, 7 Nov 2012 18:45:02 +0200 Subject: CHUI-473, CHUI-482 FIXED (Clicking on nearby chat toast to open Conversation floater does not show Nearby Chat conversation selected in list; Nearby chat conversation is not selected in list by default when it is the only conversation ): implement. new logic in LLIMFloaterContainer for the syncronous select the conv. list's item and corresponding convers. floater; removed floater selecting from conv. items; fixed bug with item select --- indra/newview/llimfloatercontainer.cpp | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'indra/newview/llimfloatercontainer.cpp') diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index af43b1ac38..c2ad94c423 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -1091,6 +1091,47 @@ void LLIMFloaterContainer::selectConversation(const LLUUID& session_id) } } +// Synchronous select the conversation item and the conversation floater +BOOL LLIMFloaterContainer::selectConversationPair(const LLUUID& session_id, bool select_widget) +{ + BOOL handled = TRUE; + + /* widget processing */ + if (select_widget) + { + LLFolderViewItem* widget = mConversationsWidgets[session_id]; + if (widget && widget->getParentFolder()) + { + widget->getParentFolder()->setSelection(widget, FALSE, FALSE); + } + } + + /* floater processing */ + + if (session_id != getSelectedSession()) + { + // Store the active session + setSelectedSession(session_id); + + LLIMConversation* session_floater = LLIMConversation::getConversation(session_id); + + if (session_floater->getHost()) + { + // Always expand the message pane if the panel is hosted by the container + collapseMessagesPane(false); + // Switch to the conversation floater that is being selected + selectFloater(session_floater); + } + + // Set the focus on the selected floater + if (!session_floater->hasFocus()) + { + session_floater->setFocus(TRUE); + } + } + + return handled; +} void LLIMFloaterContainer::setTimeNow(const LLUUID& session_id, const LLUUID& participant_id) { -- cgit v1.2.3