diff options
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llconversationview.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llimconversation.cpp | 153 | ||||
-rw-r--r-- | indra/newview/llimconversation.h | 21 | ||||
-rw-r--r-- | indra/newview/llimfloater.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 145 | ||||
-rw-r--r-- | indra/newview/llimfloatercontainer.h | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_im_session.xml | 12 |
7 files changed, 241 insertions, 117 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index de0c65e24f..3082284991 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -234,9 +234,9 @@ void LLConversationViewSession::toggleOpen() void LLConversationViewSession::selectItem() { - - 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); LLMultiFloater* host_floater = session_floater->getHost(); if (host_floater == mContainer) @@ -250,7 +250,7 @@ void LLConversationViewSession::selectItem() // Set the focus on the selected floater session_floater->setFocus(TRUE); // Store the active session - LLIMFloaterContainer::getInstance()->setSelectedSession(item->getUUID()); + LLIMFloaterContainer::getInstance()->setSelectedSession(session_uuid); LLFolderViewItem::selectItem(); @@ -272,8 +272,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()) { diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index 74bf8cb6fe..3b6294f43b 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -49,7 +49,8 @@ LLIMConversation::LLIMConversation(const LLSD& session_id) , mTearOffBtn(NULL) , mCloseBtn(NULL) , mSessionID(session_id.asUUID()) - , mParticipantList(NULL) +// , mParticipantList(NULL) + , mConversationsRoot(NULL) , mChatHistory(NULL) , mInputEditor(NULL) , mInputEditorTopPad(0) @@ -73,11 +74,13 @@ LLIMConversation::LLIMConversation(const LLSD& session_id) LLIMConversation::~LLIMConversation() { + /* if (mParticipantList) { delete mParticipantList; mParticipantList = NULL; } + */ delete mRefreshTimer; } @@ -127,11 +130,39 @@ BOOL LLIMConversation::postBuild() mExpandCollapseBtn = getChild<LLButton>("expand_collapse_btn"); mExpandCollapseBtn->setClickedCallback(boost::bind(&LLIMConversation::onSlide, this)); - mParticipantListPanel = getChild<LLLayoutPanel>("speakers_list_panel"); - mTearOffBtn = getChild<LLButton>("tear_off_btn"); mTearOffBtn->setCommitCallback(boost::bind(&LLIMConversation::onTearOffClicked, this)); + mParticipantListPanel = getChild<LLLayoutPanel>("speakers_list_panel"); + + // Create a root view folder for all participants + LLConversationItem* base_item = new LLConversationItem(mConversationViewModel); + LLFolderView::Params p(LLUICtrlFactory::getDefaultParams<LLFolderView>()); + p.rect = LLRect(0, 0, getRect().getWidth(), 0); + p.parent_panel = mParticipantListPanel; + p.listener = base_item; + p.view_model = &mConversationViewModel; + p.root = NULL; + p.use_ellipses = true; + mConversationsRoot = LLUICtrlFactory::create<LLFolderView>(p); + mConversationsRoot->setCallbackRegistrar(&mCommitCallbackRegistrar); + + // Add a scroller for the folder (participant) view + LLRect scroller_view_rect = mParticipantListPanel->getRect(); + scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom); + LLScrollContainer::Params scroller_params(LLUICtrlFactory::getDefaultParams<LLFolderViewScrollContainer>()); + scroller_params.rect(scroller_view_rect); + LLScrollContainer* scroller = LLUICtrlFactory::create<LLFolderViewScrollContainer>(scroller_params); + scroller->setFollowsAll(); + + // Insert that scroller into the panel widgets hierarchy and folder view + mParticipantListPanel->addChild(scroller); + scroller->addChild(mConversationsRoot); + mConversationsRoot->setScrollContainer(scroller); + mConversationsRoot->setFollowsAll(); + mConversationsRoot->addChild(mConversationsRoot->mStatusTextBox); + + mChatHistory = getChild<LLChatHistory>("chat_history"); mInputEditor = getChild<LLChatEntry>("chat_editor"); @@ -144,7 +175,7 @@ BOOL LLIMConversation::postBuild() setOpenPositioning(LLFloaterEnums::POSITIONING_RELATIVE); - buildParticipantList(); + buildConversationViewParticipant(); updateHeaderAndToolbar(); @@ -167,15 +198,20 @@ BOOL LLIMConversation::postBuild() return result; } +LLParticipantList* LLIMConversation::getParticipantList() +{ + return dynamic_cast<LLParticipantList*>(LLIMFloaterContainer::getInstance()->getSessionModel(mSessionID)); +} + void LLIMConversation::draw() { LLTransientDockableFloater::draw(); if (mRefreshTimer->hasExpired()) { - if (mParticipantList) + if (getParticipantList()) { - mParticipantList->update(); + getParticipantList()->update(); } refresh(); @@ -265,30 +301,107 @@ void LLIMConversation::appendMessage(const LLChat& chat, const LLSD &args) } -void LLIMConversation::buildParticipantList() +void LLIMConversation::buildConversationViewParticipant() { - if (mIsNearbyChat) + // Clear the widget list since we are rebuilding afresh from the model + conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin(); + while (widget_it != mConversationsWidgets.end()) { - LLLocalSpeakerMgr* speaker_manager = LLLocalSpeakerMgr::getInstance(); - mParticipantList = new LLParticipantList(speaker_manager, getChild<LLAvatarList>("speakers_list"), mConversationViewModel, true, false); + removeConversationViewParticipant(widget_it->first); + // Iterators are invalidated by erase so we need to pick begin again + widget_it = mConversationsWidgets.begin(); + } + + // Get the model list + LLParticipantList* item = getParticipantList(); + if (!item) + { + // Nothing to do if the model list is empty + return; + } + + // Create the participants widgets now + 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); + addConversationViewParticipant(participant_model); + current_participant_model++; + } +} + +void LLIMConversation::addConversationViewParticipant(LLConversationItem* participant_model) +{ + // Check if the model already has an associated view + LLUUID uuid = participant_model->getUUID(); + LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,uuid); + + // If not already present, create the participant view and attach it to the root, otherwise, just refresh it + if (widget) + { + updateConversationViewParticipant(uuid); // overkill? } else { - LLSpeakerMgr* speaker_manager = LLIMModel::getInstance()->getSpeakerManager(mSessionID); - // for group and ad-hoc chat we need to include agent into list - if(!mIsP2PChat && mSessionID.notNull() && speaker_manager) - { - delete mParticipantList; // remove the old list and create a new one if the session id has changed - mParticipantList = new LLParticipantList(speaker_manager, getChild<LLAvatarList>("speakers_list"), mConversationViewModel, true, false); - } + LLConversationViewParticipant* participant_view = createConversationViewParticipant(participant_model); + mConversationsWidgets[uuid] = participant_view; + participant_view->addToFolder(mConversationsRoot); + participant_view->setVisible(TRUE); + refreshConversation(); } - updateHeaderAndToolbar(); +} + +void LLIMConversation::removeConversationViewParticipant(const LLUUID& participant_id) +{ + LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,participant_id); + if (widget) + { + mConversationsRoot->extractItem(widget); + delete widget; + mConversationsWidgets.erase(participant_id); + refreshConversation(); + } +} + +void LLIMConversation::updateConversationViewParticipant(const LLUUID& participant_id) +{ + LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,participant_id); + if (widget) + { + widget->refresh(); + refreshConversation(); + } +} + +void LLIMConversation::refreshConversation() +{ + // *TODO: check that all participant models do have a view (debug consistency check) + mConversationViewModel.requestSortAll(); + mConversationsRoot->arrangeAll(); + mConversationsRoot->update(); +} + +// Copied from LLIMFloaterContainer::createConversationViewParticipant(). Refactor opportunity! +LLConversationViewParticipant* LLIMConversation::createConversationViewParticipant(LLConversationItem* item) +{ + LLRect panel_rect = mParticipantListPanel->getRect(); + + LLConversationViewParticipant::Params params; + params.name = item->getDisplayName(); + params.root = mConversationsRoot; + params.listener = item; + params.rect = LLRect (0, 24, panel_rect.getWidth(), 0); // *TODO: use conversation_view_participant.xml itemHeight value in lieu of 24 + params.tool_tip = params.name; + params.participant_id = item->getUUID(); + + return LLUICtrlFactory::create<LLConversationViewParticipant>(params); } void LLIMConversation::onSortMenuItemClicked(const LLSD& userdata) { // TODO: Check this code when sort order menu will be added. (EM) - if (!mParticipantList) + if (!getParticipantList()) { return; } @@ -297,7 +410,7 @@ void LLIMConversation::onSortMenuItemClicked(const LLSD& userdata) if (chosen_item == "sort_name") { - mParticipantList->setSortOrder(LLParticipantList::E_SORT_BY_NAME); + getParticipantList()->setSortOrder(LLParticipantList::E_SORT_BY_NAME); } } diff --git a/indra/newview/llimconversation.h b/indra/newview/llimconversation.h index 603e0d0197..4e66d000e6 100644 --- a/indra/newview/llimconversation.h +++ b/indra/newview/llimconversation.h @@ -35,6 +35,7 @@ #include "lleventtimer.h" #include "llimview.h" #include "llconversationmodel.h" +#include "llconversationview.h" class LLPanelChatControlPanel; class LLChatEntry; @@ -70,6 +71,13 @@ public: /*virtual*/ void onClose(bool app_quitting); /*virtual*/ BOOL postBuild(); /*virtual*/ void draw(); + + // Handle the left hand participant list widgets + void addConversationViewParticipant(LLConversationItem* item); + void removeConversationViewParticipant(const LLUUID& participant_id); + void updateConversationViewParticipant(const LLUUID& participant_id); + void refreshConversation(); + void buildConversationViewParticipant(); protected: @@ -88,7 +96,6 @@ protected: // refresh a visual state of the Call button void updateCallBtnState(bool callIsActive); - void buildParticipantList(); void onSortMenuItemClicked(const LLSD& userdata); void hideOrShowTitle(); // toggle the floater's drag handle @@ -114,10 +121,16 @@ protected: LLIMModel::LLIMSession* mSession; - LLLayoutPanel* mParticipantListPanel; - LLParticipantList* mParticipantList; - LLUUID mSessionID; + // Participants list: model and view + LLConversationViewParticipant* createConversationViewParticipant(LLConversationItem* item); + + LLUUID mSessionID; + LLLayoutPanel* mParticipantListPanel; // add the widgets to that see mConversationsListPanel + //LLParticipantList* mParticipantList; get this from the mConversationsItems for the moment + LLParticipantList* getParticipantList(); + conversations_widgets_map mConversationsWidgets; LLConversationViewModel mConversationViewModel; + LLFolderView* mConversationsRoot; LLChatHistory* mChatHistory; LLChatEntry* mInputEditor; diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 1af5def5f0..6d90b6a0b2 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -589,9 +589,6 @@ void LLIMFloater::addToHost(const LLUUID& session_id) return; } - // Test the existence of the floater before we try to create it - bool exist = findInstance(session_id); - // Get the floater: this will create the instance if it didn't exist LLIMFloater* floater = getInstance(session_id); if (floater) @@ -599,8 +596,8 @@ void LLIMFloater::addToHost(const LLUUID& session_id) LLIMFloaterContainer* floater_container = LLIMFloaterContainer::getInstance(); - // Do not add again existing floaters - if (!exist) + // Do not attach to the IM container if it's already attached + if (!getFloaterHost()) { // LLTabContainer::eInsertionPoint i_pt = user_initiated ? LLTabContainer::RIGHT_OF_CURRENT : LLTabContainer::END; // TODO: mantipov: use LLTabContainer::RIGHT_OF_CURRENT if it exists @@ -815,8 +812,7 @@ void LLIMFloater::sessionInitReplyReceived(const LLUUID& im_session_id) if (mSessionID != im_session_id) { initIMSession(im_session_id); - - buildParticipantList(); + buildConversationViewParticipant(); } initIMFloater(); @@ -1309,6 +1305,7 @@ void LLIMFloater::sRemoveTypingIndicator(const LLSD& data) floater->removeTypingIndicator(); } +// CHUI-441 : We should not create a floater here but go through LLIMFLoaterContainer void LLIMFloater::onIMChicletCreated( const LLUUID& session_id ) { LLIMFloater::addToHost(session_id); diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 4d2201ebb9..01456fee3b 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -98,8 +98,8 @@ LLIMFloaterContainer::~LLIMFloaterContainer() void LLIMFloaterContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) { - LLIMFloater::addToHost(session_id); addConversationListItem(session_id); + LLIMFloater::addToHost(session_id); } void LLIMFloaterContainer::sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) @@ -109,12 +109,13 @@ void LLIMFloaterContainer::sessionActivated(const LLUUID& session_id, const std: void LLIMFloaterContainer::sessionVoiceOrIMStarted(const LLUUID& session_id) { - LLIMFloater::addToHost(session_id); addConversationListItem(session_id); + LLIMFloater::addToHost(session_id); } void LLIMFloaterContainer::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) { + // CHUI-441 : We should do this *without* delete and recreate addConversationListItem(new_session_id, removeConversationListItem(old_session_id)); } @@ -407,7 +408,7 @@ bool LLIMFloaterContainer::onConversationModelEvent(const LLSD& event) // For debug only //std::ostringstream llsd_value; //llsd_value << LLSDOStreamer<LLSDNotationFormatter>(event) << std::endl; - //llinfos << "Merov debug : onConversationModelEvent, event = " << llsd_value.str() << llendl; + //llinfos << "LLIMFloaterContainer::onConversationModelEvent, event = " << llsd_value.str() << llendl; // end debug // Note: In conversations, the model is not responsible for creating the view, which is a good thing. This means that @@ -421,16 +422,18 @@ bool LLIMFloaterContainer::onConversationModelEvent(const LLSD& event) LLUUID session_id = event.get("session_uuid").asUUID(); LLUUID participant_id = event.get("participant_uuid").asUUID(); - LLConversationViewSession* session_view = dynamic_cast<LLConversationViewSession*>(mConversationsWidgets[session_id]); + LLConversationViewSession* session_view = dynamic_cast<LLConversationViewSession*>(get_ptr_in_map(mConversationsWidgets,session_id)); if (!session_view) { - // We skip events that are not associated to a session + // We skip events that are not associated with a session return false; } LLConversationViewParticipant* participant_view = session_view->findParticipant(participant_id); + LLIMConversation *conversation_floater = (session_id.isNull() ? (LLIMConversation*)(LLFloaterReg::findTypedInstance<LLNearbyChat>("nearby_chat")) : (LLIMConversation*)(LLIMFloater::findInstance(session_id))); if (type == "remove_participant") { + // Remove a participant view from the hierarchical conversation list if (participant_view) { session_view->extractItem(participant_view); @@ -438,35 +441,49 @@ bool LLIMFloaterContainer::onConversationModelEvent(const LLSD& event) session_view->refresh(); mConversationsRoot->arrangeAll(); } + // Remove a participant view from the conversation floater + if (conversation_floater) + { + conversation_floater->removeConversationViewParticipant(participant_id); + } } else if (type == "add_participant") { - if (!participant_view) + LLConversationItemSession* session_model = dynamic_cast<LLConversationItemSession*>(get_ptr_in_map(mConversationsItems,session_id)); + LLConversationItemParticipant* participant_model = (session_model ? session_model->findParticipant(participant_id) : NULL); + // Add a participant view to the hierarchical conversation list + if (!participant_view && session_model && participant_model) { - LLConversationItemSession* session_model = dynamic_cast<LLConversationItemSession*>(mConversationsItems[session_id]); - if (session_model) - { - 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); - } - } - + participant_view = createConversationViewParticipant(participant_model); + participant_view->addToFolder(session_view); + participant_view->setVisible(TRUE); + } + // Add a participant view to the conversation floater + if (conversation_floater && participant_model) + { + conversation_floater->addConversationViewParticipant(participant_model); } } else if (type == "update_participant") { + // Update the participant view in the hierarchical conversation list if (participant_view) { participant_view->refresh(); } + // Update the participant view in the conversation floater + if (conversation_floater) + { + conversation_floater->updateConversationViewParticipant(participant_id); + } } else if (type == "update_session") { session_view->refresh(); + if (conversation_floater) + { + conversation_floater->refreshConversation(); + } } mConversationViewModel.requestSortAll(); @@ -1097,10 +1114,10 @@ void LLIMFloaterContainer::showConversation(const LLUUID& session_id) selectConversation(session_id); } -//Will select only the conversation item +// Will select only the conversation item void LLIMFloaterContainer::selectConversation(const LLUUID& session_id) { - LLFolderViewItem* widget = mConversationsWidgets[session_id]; + LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,session_id); if (widget) { (widget->getRoot())->setSelection(widget, FALSE, FALSE); @@ -1110,63 +1127,55 @@ void LLIMFloaterContainer::selectConversation(const LLUUID& session_id) void LLIMFloaterContainer::setTimeNow(const LLUUID& session_id, const LLUUID& participant_id) { - conversations_items_map::iterator item_it = mConversationsItems.find(session_id); - if (item_it != mConversationsItems.end()) + LLConversationItemSession* item = dynamic_cast<LLConversationItemSession*>(get_ptr_in_map(mConversationsItems,session_id)); + if (item) { - LLConversationItemSession* item = dynamic_cast<LLConversationItemSession*>(item_it->second); - if (item) - { - item->setTimeNow(participant_id); - mConversationViewModel.requestSortAll(); - mConversationsRoot->arrangeAll(); - } + item->setTimeNow(participant_id); + mConversationViewModel.requestSortAll(); + mConversationsRoot->arrangeAll(); } } void LLIMFloaterContainer::setNearbyDistances() { - // Get the nearby chat session: that's the one with uuid nul in mConversationsItems - conversations_items_map::iterator item_it = mConversationsItems.find(LLUUID()); - if (item_it != mConversationsItems.end()) - { - LLConversationItemSession* item = dynamic_cast<LLConversationItemSession*>(item_it->second); - if (item) + // Get the nearby chat session: that's the one with uuid nul + LLConversationItemSession* item = dynamic_cast<LLConversationItemSession*>(get_ptr_in_map(mConversationsItems,LLUUID())); + if (item) + { + // Get the positions of the nearby avatars and their ids + std::vector<LLVector3d> positions; + uuid_vec_t avatar_ids; + LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgent.getPositionGlobal(), gSavedSettings.getF32("NearMeRange")); + // Get the position of the agent + const LLVector3d& me_pos = gAgent.getPositionGlobal(); + // For each nearby avatar, compute and update the distance + int avatar_count = positions.size(); + for (int i = 0; i < avatar_count; i++) { - // Get the positions of the nearby avatars and their ids - std::vector<LLVector3d> positions; - uuid_vec_t avatar_ids; - LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgent.getPositionGlobal(), gSavedSettings.getF32("NearMeRange")); - // Get the position of the agent - const LLVector3d& me_pos = gAgent.getPositionGlobal(); - // For each nearby avatar, compute and update the distance - int avatar_count = positions.size(); - for (int i = 0; i < avatar_count; i++) - { - F64 dist = dist_vec_squared(positions[i], me_pos); - item->setDistance(avatar_ids[i],dist); - } - // Also does it for the agent itself - item->setDistance(gAgent.getID(),0.0f); - // Request resort - mConversationViewModel.requestSortAll(); - mConversationsRoot->arrangeAll(); + F64 dist = dist_vec_squared(positions[i], me_pos); + item->setDistance(avatar_ids[i],dist); } + // Also does it for the agent itself + item->setDistance(gAgent.getID(),0.0f); + // Request resort + mConversationViewModel.requestSortAll(); + mConversationsRoot->arrangeAll(); } } -void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid, bool isWidgetSelected /*= false*/) +LLConversationItem* LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid, bool isWidgetSelected /*= false*/) { bool is_nearby_chat = uuid.isNull(); - //Stores the display name for the conversation line item + // Stores the display name for the conversation line item std::string display_name = is_nearby_chat ? LLTrans::getString("NearbyChatLabel") : LLIMModel::instance().getName(uuid); - // Check if the item is not already in the list, exit if it is and has the same name and uuid (nothing to do) + // Check if the item is not already in the list, exit (nothing to do) // Note: this happens often, when reattaching a torn off conversation for instance conversations_items_map::iterator item_it = mConversationsItems.find(uuid); if (item_it != mConversationsItems.end()) { - return; + return item_it->second; } // Remove the conversation item that might exist already: it'll be recreated anew further down anyway @@ -1183,7 +1192,7 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid, bool isWi if (!item) { llwarns << "Couldn't create conversation session item : " << display_name << llendl; - return; + return NULL; } item->renameItem(display_name); item->updateParticipantName(NULL); @@ -1209,6 +1218,12 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid, bool isWi participant_view->addToFolder(widget); current_participant_model++; } + // Do that too for the conversation dialog + LLIMConversation *conversation_floater = (uuid.isNull() ? (LLIMConversation*)(LLFloaterReg::findTypedInstance<LLNearbyChat>("nearby_chat")) : (LLIMConversation*)(LLIMFloater::findInstance(uuid))); + if (conversation_floater) + { + conversation_floater->buildConversationViewParticipant(); + } // set the widget to minimized mode if conversations pane is collapsed widget->toggleMinimizedMode(mConversationsPane->isCollapsed()); @@ -1220,7 +1235,7 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid, bool isWi mConversationsRoot->scrollToShowSelection(); } - return; + return item; } bool LLIMFloaterContainer::removeConversationListItem(const LLUUID& uuid, bool change_focus) @@ -1229,15 +1244,11 @@ bool LLIMFloaterContainer::removeConversationListItem(const LLUUID& uuid, bool c // Note : since the mConversationsItems is also the listener to the widget, deleting // the widget will also delete its listener bool isWidgetSelected = false; - conversations_widgets_map::iterator widget_it = mConversationsWidgets.find(uuid); - if (widget_it != mConversationsWidgets.end()) + LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,uuid); + if (widget) { - LLFolderViewItem* widget = widget_it->second; - if (widget) - { - isWidgetSelected = widget->isSelected(); - widget->destroyView(); - } + isWidgetSelected = widget->isSelected(); + widget->destroyView(); } // Suppress the conversation items and widgets from their respective maps diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index 7d13b37b31..cc6cc8c464 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -93,6 +93,7 @@ public: LLConversationViewModel& getRootViewModel() { return mConversationViewModel; } LLUUID getSelectedSession() { return mSelectedSession; } void setSelectedSession(LLUUID sessionID) { mSelectedSession = sessionID; } + LLConversationItem* getSessionModel(const LLUUID& session_id) { return get_ptr_in_map(mConversationsItems,session_id); } private: typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t; @@ -153,7 +154,7 @@ private: // Conversation list implementation public: bool removeConversationListItem(const LLUUID& uuid, bool change_focus = true); - void addConversationListItem(const LLUUID& uuid, bool isWidgetSelected = false); + LLConversationItem* addConversationListItem(const LLUUID& uuid, bool isWidgetSelected = false); void setTimeNow(const LLUUID& session_id, const LLUUID& participant_id); void setNearbyDistances(); diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 2b542595c5..84fba0a3b3 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -158,18 +158,6 @@ width="150" height="310" auto_resize="false"> - <avatar_list - color="DkGray2" - follows="all" - height="310" - ignore_online_status="true" - layout="topleft" - name="speakers_list" - opaque="false" - show_info_btn="true" - show_profile_btn="false" - show_speaking_indicator="false" - width="150" /> </layout_panel> <layout_panel default_tab_group="3" |