summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llconversationmodel.cpp3
-rwxr-xr-xindra/newview/llfloaterimcontainer.cpp27
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_conversation.xml6
3 files changed, 25 insertions, 11 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 6e95df8383..ee55b8fe80 100755
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -367,12 +367,14 @@ void LLConversationItemSession::buildContextMenu(LLMenuGL& menu, U32 flags)
if(this->getType() == CONV_SESSION_1_ON_1)
{
items.push_back(std::string("close_conversation"));
+ items.push_back(std::string("close_all_conversations"));
items.push_back(std::string("separator_disconnect_from_voice"));
buildParticipantMenuOptions(items, flags);
}
else if(this->getType() == CONV_SESSION_GROUP)
{
items.push_back(std::string("close_conversation"));
+ items.push_back(std::string("close_all_conversations"));
addVoiceOptions(items);
items.push_back(std::string("chat_history"));
items.push_back(std::string("separator_chat_history"));
@@ -383,6 +385,7 @@ void LLConversationItemSession::buildContextMenu(LLMenuGL& menu, U32 flags)
else if(this->getType() == CONV_SESSION_AD_HOC)
{
items.push_back(std::string("close_conversation"));
+ items.push_back(std::string("close_all_conversations"));
addVoiceOptions(items);
items.push_back(std::string("chat_history"));
}
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*/)
{
diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml
index 5a13ef0a59..7494309315 100755
--- a/indra/newview/skins/default/xui/en/menu_conversation.xml
+++ b/indra/newview/skins/default/xui/en/menu_conversation.xml
@@ -12,6 +12,12 @@
name="close_conversation">
<on_click function="Avatar.DoToSelected" parameter="close_conversation"/>
</menu_item_call>
+ <menu_item_call
+ label="Close All conversations"
+ layout="topleft"
+ name="close_all_conversations">
+ <on_click function="Avatar.DoToSelected" parameter="close_all_conversations"/>
+ </menu_item_call>
<menu_item_call
label="Open voice conversation"
layout="topleft"