diff options
author | mberezhnoy <mberezhnoy@productengine.com> | 2013-06-07 19:34:34 +0300 |
---|---|---|
committer | mberezhnoy <mberezhnoy@productengine.com> | 2013-06-07 19:34:34 +0300 |
commit | 15b6a395d00d55c50e98c86498669bd06782cb15 (patch) | |
tree | 0a64d37e2b21c5e084d7855be7128c28f458ac89 /indra/newview/llfloaterimcontainer.cpp | |
parent | 57b21335ba232d4023ec2cda81153d02bc190f6b (diff) | |
parent | 0bcb1db3ea8056e96b6cb087758e6ee57bc122a3 (diff) |
merge
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 01278e0637..918c85b07e 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) |