summaryrefslogtreecommitdiff
path: root/indra/newview/llinspectavatar.cpp
diff options
context:
space:
mode:
authorPaul Guslisty <pguslisty@productengine.com>2010-03-25 09:04:01 +0200
committerPaul Guslisty <pguslisty@productengine.com>2010-03-25 09:04:01 +0200
commitd5d9668a59895874951fb3e5927ea0159270a6e8 (patch)
tree399972f600e972976bc08982b7024d76c6c4e435 /indra/newview/llinspectavatar.cpp
parent7fa6e0ad6c7a916b45ca1ff7f6603ca2a5726a97 (diff)
Fixed low bug EXT-6488 (Teleport menuitem is enabled for offline residents in the context menu and inspectors)
- Added a check for a teleport offer ability. In XML created a paremeter and check it in source code. Reviewed by Leyla Farazha at https://codereview.productengine.com/secondlife/r/86/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llinspectavatar.cpp')
-rw-r--r--indra/newview/llinspectavatar.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index 35cb9b3468..94ea236757 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -137,6 +137,7 @@ private:
void onVolumeChange(const LLSD& data);
bool enableMute();
bool enableUnmute();
+ bool enableTeleportOffer();
// Is used to determine if "Add friend" option should be enabled in gear menu
bool isNotFriend();
@@ -235,6 +236,7 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd)
boost::bind(&LLInspectAvatar::onVisibleZoomIn, this));
mEnableCallbackRegistrar.add("InspectAvatar.Gear.Enable", boost::bind(&LLInspectAvatar::isNotFriend, this));
mEnableCallbackRegistrar.add("InspectAvatar.Gear.EnableCall", boost::bind(&LLAvatarActions::canCall));
+ mEnableCallbackRegistrar.add("InspectAvatar.Gear.EnableTeleportOffer", boost::bind(&LLInspectAvatar::enableTeleportOffer, this));
mEnableCallbackRegistrar.add("InspectAvatar.EnableMute", boost::bind(&LLInspectAvatar::enableMute, this));
mEnableCallbackRegistrar.add("InspectAvatar.EnableUnmute", boost::bind(&LLInspectAvatar::enableUnmute, this));
@@ -764,6 +766,11 @@ bool LLInspectAvatar::enableUnmute()
}
}
+bool LLInspectAvatar::enableTeleportOffer()
+{
+ return LLAvatarActions::canOfferTeleport(mAvatarID);
+}
+
//////////////////////////////////////////////////////////////////////////////
// LLInspectAvatarUtil
//////////////////////////////////////////////////////////////////////////////