summaryrefslogtreecommitdiff
path: root/indra/newview/llinspectavatar.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2009-11-18 10:43:30 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2009-11-18 10:43:30 +0000
commit22aa5eed910bbd1b366789cb96247899c744df75 (patch)
tree40bf09c7239e6983b3eb279695b9f662ce4d4d0e /indra/newview/llinspectavatar.cpp
parent939e48d38cf9f15e1f7220cc3860810badd8a778 (diff)
parent125b779fb63cafe4e5df4d601542def1b4bc05f3 (diff)
merge.
Diffstat (limited to 'indra/newview/llinspectavatar.cpp')
-rw-r--r--indra/newview/llinspectavatar.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index 8dc7833f6a..baddd90d46 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -117,6 +117,9 @@ private:
bool onVisibleZoomIn();
void onClickMuteVolume();
void onVolumeChange(const LLSD& data);
+
+ // Is used to determine if "Add friend" option should be enabled in gear menu
+ bool isNotFriend();
// Callback for gCacheName to look up avatar name
void nameUpdatedCallback(
@@ -208,6 +211,7 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd)
boost::bind(&LLInspectAvatar::onVisibleFreezeEject, this));
mVisibleCallbackRegistrar.add("InspectAvatar.VisibleZoomIn",
boost::bind(&LLInspectAvatar::onVisibleZoomIn, this));
+ mEnableCallbackRegistrar.add("InspectAvatar.Gear.Enable", boost::bind(&LLInspectAvatar::isNotFriend, this));
// can't make the properties request until the widgets are constructed
// as it might return immediately, so do it in postBuild.
@@ -473,6 +477,11 @@ void LLInspectAvatar::onClickViewProfile()
closeFloater();
}
+bool LLInspectAvatar::isNotFriend()
+{
+ return !LLAvatarActions::isFriend(mAvatarID);
+}
+
bool LLInspectAvatar::onVisibleFindOnMap()
{
return gAgent.isGodlike() || is_agent_mappable(mAvatarID);