diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2013-06-04 14:49:07 +0300 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2013-06-04 14:49:07 +0300 |
commit | 430af6f731b2b822dd91d3163d7e206e3559a211 (patch) | |
tree | 3cd036377dd28c04e0d4086bfe484bf7e705b2b7 /indra/newview/llfloaterimcontainer.cpp | |
parent | 3bbab5bb46b034b87eef88466d4cf84d841bb087 (diff) |
CHUI-918 FIXED Close only selected conversations instead of closing all conversations.
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rwxr-xr-x | indra/newview/llfloaterimcontainer.cpp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 3783ae60e7..60ece0aab1 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -981,7 +981,7 @@ void LLFloaterIMContainer::setSortOrder(const LLConversationSort& order) gSavedSettings.setU32("ConversationSortOrder", (U32)order); } -void LLFloaterIMContainer::getSelectedUUIDs(uuid_vec_t& selected_uuids) +void LLFloaterIMContainer::getSelectedUUIDs(uuid_vec_t& selected_uuids, bool participant_uuids/* = true*/) { const std::set<LLFolderViewItem*> selectedItems = mConversationsRoot->getSelectionList(); @@ -994,7 +994,7 @@ void LLFloaterIMContainer::getSelectedUUIDs(uuid_vec_t& selected_uuids) conversationItem = static_cast<LLConversationItem *>((*it)->getViewModelItem()); //When a one-on-one conversation exists, retrieve the participant id from the conversation floater - if(conversationItem->getType() == LLConversationItem::CONV_SESSION_1_ON_1) + if(conversationItem->getType() == LLConversationItem::CONV_SESSION_1_ON_1 && participant_uuids) { LLFloaterIMSession * conversation_floaterp = LLFloaterIMSession::findInstance(conversationItem->getUUID()); LLUUID participant_id = conversation_floaterp->getOtherParticipantUUID(); @@ -1149,9 +1149,10 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command, { LLFloater::onClickClose(conversationFloater); } - else if("close_all_conversations" == command) + else if("close_selected_conversations" == command) { - closeAllConversations(); + getSelectedUUIDs(selectedIDS,false); + closeSelectedConversations(selectedIDS); } else if("open_voice_conversation" == command) { @@ -2117,6 +2118,22 @@ void LLFloaterIMContainer::closeAllConversations() LLFloater::onClickClose(conversationFloater); } } + +void LLFloaterIMContainer::closeSelectedConversations(const uuid_vec_t& ids) +{ + for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) + { + //We don't need to close Nearby chat, so skip it + if (*it != LLUUID()) + { + LLFloaterIMSession *conversationFloater = LLFloaterIMSession::findInstance(*it); + if(conversationFloater) + { + LLFloater::onClickClose(conversationFloater); + } + } + } +} void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) { if(app_quitting) |