summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpeople.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r--indra/newview/llpanelpeople.cpp34
1 files changed, 31 insertions, 3 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 9dc80c0515..61d66873ea 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -690,6 +690,27 @@ LLUUID LLPanelPeople::getCurrentItemID() const
return LLUUID::null;
}
+void LLPanelPeople::getCurrentItemIDs(std::vector<LLUUID>& selected_uuids) const
+{
+ std::string cur_tab = getActiveTabName();
+
+ if (cur_tab == FRIENDS_TAB_NAME)
+ {
+ // friends tab has two lists
+ mOnlineFriendList->getSelectedUUIDs(selected_uuids);
+ mAllFriendList->getSelectedUUIDs(selected_uuids);
+ }
+ else if (cur_tab == NEARBY_TAB_NAME)
+ mNearbyList->getSelectedUUIDs(selected_uuids);
+ else if (cur_tab == RECENT_TAB_NAME)
+ mRecentList->getSelectedUUIDs(selected_uuids);
+ else if (cur_tab == GROUP_TAB_NAME)
+ mGroupList->getSelectedUUIDs(selected_uuids);
+ else
+ llassert(0 && "unknown tab selected");
+
+}
+
void LLPanelPeople::showGroupMenu(LLMenuGL* menu)
{
// Shows the menu at the top of the button bar.
@@ -873,10 +894,17 @@ void LLPanelPeople::onChatButtonClicked()
void LLPanelPeople::onImButtonClicked()
{
- LLUUID id = getCurrentItemID();
- if (id.notNull())
+ std::vector<LLUUID> selected_uuids;
+ getCurrentItemIDs(selected_uuids);
+ if ( selected_uuids.size() == 1 )
+ {
+ // if selected only one person then start up IM
+ LLAvatarActions::startIM(selected_uuids.at(0));
+ }
+ else if ( selected_uuids.size() > 1 )
{
- LLAvatarActions::startIM(id);
+ // for multiple selection start up friends conference
+ LLAvatarActions::startConference(selected_uuids);
}
}