summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpeople.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-10-23 16:44:23 -0700
committerJames Cook <james@lindenlab.com>2009-10-23 16:44:23 -0700
commit07f7247dff19cb7acd320113734773c099b0366d (patch)
tree7072f301675db427686c06eca48592b89d4db227 /indra/newview/llpanelpeople.cpp
parent71822edfe824c5f7c742d6d9b8528f8ff541963b (diff)
parent2b69cb9e9cf5209a8156580b74e6662e4cc4243f (diff)
merge
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);
}
}