summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelavatar.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2010-03-22 16:12:41 -0700
committerRoxie Linden <roxie@lindenlab.com>2010-03-22 16:12:41 -0700
commit18b7ab0018695e261dbc5058d76f9d371958b034 (patch)
tree9b4baa5a5ca563ace1b06ac6b3df9fd9c0a0d0f7 /indra/newview/llpanelavatar.cpp
parent60c4621500e478d66a8bdc3a1c80573be2860fee (diff)
parentbe139dfb957e1b0d3c59110284c43630d3b57d23 (diff)
Weekly automated merge from viewer 2.0
Diffstat (limited to 'indra/newview/llpanelavatar.cpp')
-rw-r--r--indra/newview/llpanelavatar.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 2c5af1221c..b554af66f0 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -495,6 +495,7 @@ BOOL LLPanelAvatarProfile::postBuild()
&LLPanelAvatarProfile::onMapButtonClick, this)), NULL);
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
+ registrar.add("Profile.ShowOnMap", boost::bind(&LLPanelAvatarProfile::onMapButtonClick, this));
registrar.add("Profile.Pay", boost::bind(&LLPanelAvatarProfile::pay, this));
registrar.add("Profile.Share", boost::bind(&LLPanelAvatarProfile::share, this));
registrar.add("Profile.BlockUnblock", boost::bind(&LLPanelAvatarProfile::toggleBlock, this));
@@ -504,6 +505,7 @@ BOOL LLPanelAvatarProfile::postBuild()
registrar.add("Profile.CSR", boost::bind(&LLPanelAvatarProfile::csr, this));
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable;
+ enable.add("Profile.EnableShowOnMap", boost::bind(&LLPanelAvatarProfile::enableShowOnMap, this));
enable.add("Profile.EnableGod", boost::bind(&enable_god));
enable.add("Profile.EnableBlock", boost::bind(&LLPanelAvatarProfile::enableBlock, this));
enable.add("Profile.EnableUnblock", boost::bind(&LLPanelAvatarProfile::enableUnblock, this));
@@ -698,6 +700,15 @@ void LLPanelAvatarProfile::toggleBlock()
LLAvatarActions::toggleBlock(getAvatarId());
}
+bool LLPanelAvatarProfile::enableShowOnMap()
+{
+ bool is_buddy_online = LLAvatarTracker::instance().isBuddyOnline(getAvatarId());
+
+ bool enable_map_btn = (is_buddy_online && is_agent_mappable(getAvatarId()))
+ || gAgent.isGodlike();
+ return enable_map_btn;
+}
+
bool LLPanelAvatarProfile::enableBlock()
{
return LLAvatarActions::canBlock(getAvatarId()) && !LLAvatarActions::isBlocked(getAvatarId());