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.cpp31
1 files changed, 30 insertions, 1 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 5fb7dab7be..e134840153 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -586,6 +586,7 @@ BOOL LLPanelPeople::postBuild()
registrar.add("People.Groups.ViewSort.Action", boost::bind(&LLPanelPeople::onGroupsViewSortMenuItemClicked, this, _2));
registrar.add("People.Recent.ViewSort.Action", boost::bind(&LLPanelPeople::onRecentViewSortMenuItemClicked, this, _2));
+ enable_registrar.add("People.Group.Minus.Enable", boost::bind(&LLPanelPeople::isRealGroup, this));
enable_registrar.add("People.Friends.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemCheck, this, _2));
enable_registrar.add("People.Recent.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onRecentViewSortMenuItemCheck, this, _2));
enable_registrar.add("People.Nearby.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemCheck, this, _2));
@@ -775,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();
@@ -783,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();
@@ -921,6 +945,11 @@ void LLPanelPeople::reSelectedCurrentTab()
mTabContainer->selectTab(mTabContainer->getCurrentPanelIndex());
}
+bool LLPanelPeople::isRealGroup()
+{
+ return getCurrentItemID() != LLUUID::null;
+}
+
void LLPanelPeople::onFilterEdit(const std::string& search_string)
{
std::string search_upper = search_string;