summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpeople.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-15 19:20:03 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-15 19:20:03 -0500
commit073ec70829723e54f822052fe9c6c3e998e8dfca (patch)
tree3d7e782101a2284bcb0fcbf61273f8167d03544f /indra/newview/llpanelpeople.cpp
parent4d4406820b858d59be670f0ca03bdadefba61c53 (diff)
parente7eae453908e77a959a2ef6fea272107491fe35e (diff)
automated merge viewer2.0->avp
--HG-- branch : avatar-pipeline
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;