diff options
Diffstat (limited to 'indra/newview/llinspectavatar.cpp')
-rw-r--r-- | indra/newview/llinspectavatar.cpp | 9 |
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); |