summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llconversationmodel.cpp8
-rwxr-xr-xindra/newview/llfloaterimcontainer.cpp25
-rwxr-xr-xindra/newview/llfloaterimcontainer.h3
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_conversation.xml14
4 files changed, 34 insertions, 16 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index ee55b8fe80..27caedf472 100755
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -363,18 +363,19 @@ void LLConversationItemSession::buildContextMenu(LLMenuGL& menu, U32 flags)
lldebugs << "LLConversationItemParticipant::buildContextMenu()" << llendl;
menuentry_vec_t items;
menuentry_vec_t disabled_items;
-
+ if(flags & ITEM_IN_MULTI_SELECTION)
+ {
+ items.push_back(std::string("close_selected_conversations"));
+ }
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"));
@@ -385,7 +386,6 @@ 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 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)
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 5121e902cb..5cd92beed1 100755
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -119,6 +119,7 @@ public:
virtual BOOL handleKeyHere(KEY key, MASK mask );
/*virtual*/ void closeFloater(bool app_quitting = false);
void closeAllConversations();
+ void closeSelectedConversations(const uuid_vec_t& ids);
/*virtual*/ BOOL isFrontmost();
@@ -151,7 +152,7 @@ private:
void setSortOrderParticipants(const LLConversationFilter::ESortOrderType order);
void setSortOrder(const LLConversationSort& order);
- void getSelectedUUIDs(uuid_vec_t& selected_uuids);
+ void getSelectedUUIDs(uuid_vec_t& selected_uuids, bool participant_uuids = true);
const LLConversationItem * getCurSelectedViewModelItem();
void getParticipantUUIDs(uuid_vec_t& selected_uuids);
void doToSelected(const LLSD& userdata);
diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml
index 7494309315..b3d28788da 100755
--- a/indra/newview/skins/default/xui/en/menu_conversation.xml
+++ b/indra/newview/skins/default/xui/en/menu_conversation.xml
@@ -11,13 +11,7 @@
layout="topleft"
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>
<menu_item_call
label="Open voice conversation"
layout="topleft"
@@ -31,6 +25,12 @@
<on_click function="Avatar.DoToSelected" parameter="disconnect_from_voice"/>
</menu_item_call>
<menu_item_separator layout="topleft" name="separator_disconnect_from_voice"/>
+ <menu_item_call
+ label="Close Selected"
+ layout="topleft"
+ name="close_selected_conversations">
+ <on_click function="Avatar.DoToSelected" parameter="close_selected_conversations"/>
+ </menu_item_call>
<menu_item_call
label="View Profile"
layout="topleft"