diff options
| author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-03-24 18:04:26 +0200 |
|---|---|---|
| committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-03-24 18:04:26 +0200 |
| commit | d3a606f8323a32c660c71675257e3abd95cb097e (patch) | |
| tree | 11e272b194cb42bd9b11b861395f44793d3fa9f6 /indra/newview/llpanelavatar.cpp | |
| parent | 5f46430a1aa16212838dd7a9493a42fcb5e92ec3 (diff) | |
| parent | 7857f59f9e7c673f1ddbf32d6a66e85f78004445 (diff) | |
Manual merge from default branch.
Resolved conflicts in llpanellandmarks.cpp.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llpanelavatar.cpp')
| -rw-r--r-- | indra/newview/llpanelavatar.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 57b478ffef..a0ba2f739b 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()); |
