diff options
author | Andrew Dyukov <adyukov@productengine.com> | 2009-11-16 21:40:11 +0200 |
---|---|---|
committer | Andrew Dyukov <adyukov@productengine.com> | 2009-11-16 21:40:11 +0200 |
commit | 19d90dc5ed5494308744c02be9afb7eb021244e0 (patch) | |
tree | 074b9cb5da018145d15dce7050157929897d4795 /indra/newview/llinspectavatar.cpp | |
parent | 743c8f7cbbc189e5ba3d0f5058790232ac6d03aa (diff) |
fixed minor bug EXT-2506 ('Add friend' menu item is enabled in fiend miniinspector's gear menu).
--HG--
branch : product-engine
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); |