summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpeople.cpp
diff options
context:
space:
mode:
authorAimee Linden <aimee@lindenlab.com>2010-09-01 16:08:22 +0100
committerAimee Linden <aimee@lindenlab.com>2010-09-01 16:08:22 +0100
commita8b9a201d3797a341ab4bcaffef2954c2bb0e0d2 (patch)
tree6c509491e78ed08aadab448a5f5c52bc1c4eb13b /indra/newview/llpanelpeople.cpp
parent711ccfa57f5feb526bea6d3cea8d41a7079179b0 (diff)
parent047b74c4f4727c41ae1086d18a12a9cf5aad5fce (diff)
VWR-22454 (EXT-8248) MERGE Can't teleport multiple friends
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rw-r--r--indra/newview/llpanelpeople.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 8627274e80..06ba08b51c 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -776,12 +776,6 @@ void LLPanelPeople::buttonSetAction(const std::string& btn_name, const commit_si
button->setClickedCallback(cb);
}
-bool LLPanelPeople::isFriendOnline(const LLUUID& id)
-{
- uuid_vec_t ids = mOnlineFriendList->getIDs();
- return std::find(ids.begin(), ids.end(), id) != ids.end();
-}
-
void LLPanelPeople::updateButtons()
{
std::string cur_tab = getActiveTabName();
@@ -843,11 +837,11 @@ void LLPanelPeople::updateButtons()
bool enable_calls = LLVoiceClient::getInstance()->isVoiceWorking() && LLVoiceClient::getInstance()->voiceEnabled();
- buttonSetEnabled("teleport_btn", friends_tab_active && item_selected && isFriendOnline(selected_uuids.front()));
- buttonSetEnabled("view_profile_btn", item_selected);
- buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection
- buttonSetEnabled("call_btn", multiple_selected && enable_calls);
- buttonSetEnabled("share_btn", item_selected); // not implemented yet
+ buttonSetEnabled("view_profile_btn",item_selected);
+ buttonSetEnabled("share_btn", item_selected);
+ buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection
+ buttonSetEnabled("call_btn", multiple_selected && enable_calls);
+ buttonSetEnabled("teleport_btn", multiple_selected && LLAvatarActions::canOfferTeleport(selected_uuids));
bool none_group_selected = item_selected && selected_id.isNull();
buttonSetEnabled("group_info_btn", !none_group_selected);
@@ -1328,7 +1322,9 @@ void LLPanelPeople::onGroupCallButtonClicked()
void LLPanelPeople::onTeleportButtonClicked()
{
- LLAvatarActions::offerTeleport(getCurrentItemID());
+ uuid_vec_t selected_uuids;
+ getCurrentItemIDs(selected_uuids);
+ LLAvatarActions::offerTeleport(selected_uuids);
}
void LLPanelPeople::onShareButtonClicked()