diff options
author | Mike Antipov <mantipov@productengine.com> | 2010-03-19 17:03:32 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2010-03-19 17:03:32 +0200 |
commit | 4347af5763672d0b575ad255aa3565a51c0a632e (patch) | |
tree | d04ed9b22bd7fce4a25309dc1af32e1173c7f7c1 /indra/newview/llpanelavatar.cpp | |
parent | 8f40c559f37ec33886e34c42dc076d4bb28ab609 (diff) |
Done normal task EXT-6267 ([TRUNCATION] [EN XUI REWORK] - Side panel, profiles: the teleport button is truncated. need 'en' xui designer rework)
* moved Map Button into the dropdown menu (with enable/click logic). New <menu_item_call label="Map" name="show_on_map"> is added into the menu_profile_overflow.xml
* redesigned rest of buttons to accommodate available space
Now buttons' widths are enough to not truncate labels in all locales.
NOTE: New "Map" item menu should be localized (just move values from panel_profile.xml to menu_profile_overflow.xml) in other locales.
Reviewed by Vadim at https://codereview.productengine.com/secondlife/r/59/
--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()); |