summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimcontainer.cpp
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2013-05-29 15:53:36 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2013-05-29 15:53:36 +0300
commitef69d31b993fe849526799f225dd0eda12c82dab (patch)
treed17a513c580b4c875c5b68b7a90c16d43958d85c /indra/newview/llfloaterimcontainer.cpp
parentca6ba9f4fd514cca28e690fb1219e20e22f6a8e4 (diff)
CHUI-918 FIXED "Close all conversations" menu item is added to context menu.
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rwxr-xr-xindra/newview/llfloaterimcontainer.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 700bc94105..4bfb19ce36 100755
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -977,7 +977,7 @@ void LLFloaterIMContainer::setSortOrder(const LLConversationSort& order)
conversation_floater->setSortOrder(order);
}
}
-
+
gSavedSettings.setU32("ConversationSortOrder", (U32)order);
}
@@ -1149,6 +1149,10 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command,
{
LLFloater::onClickClose(conversationFloater);
}
+ else if("close_all_conversations" == command)
+ {
+ closeAllConversations();
+ }
else if("open_voice_conversation" == command)
{
gIMMgr->startCall(conversationItem->getUUID());
@@ -2097,20 +2101,21 @@ void LLFloaterIMContainer::closeHostedFloater()
void LLFloaterIMContainer::closeAllConversations()
{
- conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin();
- for (;widget_it != mConversationsWidgets.end(); ++widget_it)
+ LLDynamicArray<LLUUID> ids;
+ for (conversations_items_map::iterator it_session = mConversationsItems.begin(); it_session != mConversationsItems.end(); it_session++)
{
- if (widget_it->first != LLUUID())
+ LLUUID session_id = it_session->first;
+ if (session_id != LLUUID())
{
- LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(widget_it->second);
- if (widget)
- {
- widget->destroyView();
- mConversationsItems.erase(widget_it->first);
- mConversationsWidgets.erase(widget_it->first);
- }
+ ids.push_back(session_id);
}
}
+
+ for (LLDynamicArray<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
+ {
+ LLFloaterIMSession *conversationFloater = LLFloaterIMSession::findInstance(*it);
+ LLFloater::onClickClose(conversationFloater);
+ }
}
void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
{