diff options
author | Oz Linden <oz@lindenlab.com> | 2010-12-03 07:33:24 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2010-12-03 07:33:24 -0500 |
commit | 2491555272283340206f3532b9417ec07df40022 (patch) | |
tree | 62cd035d30bbc1689d2bf5fd11261487927b0754 /indra/newview/llpanelavatar.cpp | |
parent | 039c0466f9759d7b966d8faf60945b3924d017a8 (diff) | |
parent | 36954908632d6f5366f6517023676c1bcd71aa17 (diff) |
pull latest fixes back from viewer-beta
Diffstat (limited to 'indra/newview/llpanelavatar.cpp')
-rw-r--r-- | indra/newview/llpanelavatar.cpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 57180f63b5..1249d5d856 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -34,6 +34,7 @@ #include "llcombobox.h" #include "lldateutil.h" // ageFromDate() #include "llimview.h" +#include "llmenubutton.h" #include "llnotificationsutil.h" #include "lltexteditor.h" #include "lltexturectrl.h" @@ -479,7 +480,6 @@ BOOL LLPanelAvatarProfile::postBuild() childSetCommitCallback("im",(boost::bind(&LLPanelAvatarProfile::onIMButtonClick,this)),NULL); childSetCommitCallback("call",(boost::bind(&LLPanelAvatarProfile::onCallButtonClick,this)),NULL); childSetCommitCallback("teleport",(boost::bind(&LLPanelAvatarProfile::onTeleportButtonClick,this)),NULL); - childSetCommitCallback("overflow_btn", boost::bind(&LLPanelAvatarProfile::onOverflowButtonClicked, this), NULL); childSetCommitCallback("share",(boost::bind(&LLPanelAvatarProfile::onShareButtonClick,this)),NULL); childSetCommitCallback("show_on_map_btn", (boost::bind( &LLPanelAvatarProfile::onMapButtonClick, this)), NULL); @@ -500,7 +500,8 @@ BOOL LLPanelAvatarProfile::postBuild() enable.add("Profile.EnableBlock", boost::bind(&LLPanelAvatarProfile::enableBlock, this)); enable.add("Profile.EnableUnblock", boost::bind(&LLPanelAvatarProfile::enableUnblock, this)); - mProfileMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_profile_overflow.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + LLToggleableMenu* profile_menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_profile_overflow.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + getChild<LLMenuButton>("overflow_btn")->setMenu(profile_menu, LLMenuButton::MP_TOP_RIGHT); LLVoiceClient::getInstance()->addObserver((LLVoiceClientStatusObserver*)this); @@ -752,23 +753,6 @@ void LLPanelAvatarProfile::onShareButtonClick() //*TODO not implemented } -void LLPanelAvatarProfile::onOverflowButtonClicked() -{ - if (!mProfileMenu->toggleVisibility()) - return; - - LLView* btn = getChild<LLView>("overflow_btn"); - - if (mProfileMenu->getButtonRect().isEmpty()) - { - mProfileMenu->setButtonRect(btn); - } - mProfileMenu->updateParent(LLMenuGL::sMenuContainer); - - LLRect rect = btn->getRect(); - LLMenuGL::showPopup(this, mProfileMenu, rect.mRight, rect.mTop); -} - LLPanelAvatarProfile::~LLPanelAvatarProfile() { if(getAvatarId().notNull()) |