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.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 79a593a8c9..e134840153 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -776,7 +776,7 @@ void LLPanelPeople::updateButtons()
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 && LLVoiceClient::voiceEnabled());
+ buttonSetEnabled("call_btn", multiple_selected && canCall());
buttonSetEnabled("share_btn", item_selected); // not implemented yet
bool none_group_selected = item_selected && selected_id.isNull();
@@ -784,6 +784,29 @@ void LLPanelPeople::updateButtons()
buttonSetEnabled("chat_btn", !none_group_selected);
}
+bool LLPanelPeople::canCall()
+{
+ std::vector<LLUUID> selected_uuids;
+ getCurrentItemIDs(selected_uuids);
+
+ bool result = false;
+
+ std::vector<LLUUID>::const_iterator
+ id = selected_uuids.begin(),
+ uuids_end = selected_uuids.end();
+
+ for (;id != uuids_end; ++id)
+ {
+ if (LLAvatarActions::canCall(*id))
+ {
+ result = true;
+ break;
+ }
+ }
+
+ return result;
+}
+
std::string LLPanelPeople::getActiveTabName() const
{
return mTabContainer->getCurrentPanel()->getName();