From 66b3fbf17624d0127b40f6b083b00aa2837738e9 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Thu, 8 Apr 2010 08:06:40 +0300 Subject: Fixed major bug EXT-6605 (No profile verb button on Places panel) - Added functionality of showing place profile to the LLPanelPlacesTab hierarchy. Use this functionality from LLPanelPlaces as callback for profile button click. Reviewed my Mike Antipov at https://codereview.productengine.com/secondlife/r/191/ --HG-- branch : product-engine --- indra/newview/llpanelplaces.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/newview/llpanelplaces.cpp') diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 54455afa4f..17784c31e3 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -252,6 +252,9 @@ BOOL LLPanelPlaces::postBuild() mOverflowBtn = getChild("overflow_btn"); mOverflowBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onOverflowButtonClicked, this)); + mPlaceInfoBtn = getChild("profile_btn"); + mPlaceInfoBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onProfileButtonClicked, this)); + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("Places.OverflowMenu.Action", boost::bind(&LLPanelPlaces::onOverflowMenuItemClicked, this, _2)); LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; @@ -745,6 +748,14 @@ void LLPanelPlaces::onOverflowButtonClicked() LLMenuGL::showPopup(this, menu, rect.mRight, rect.mTop); } +void LLPanelPlaces::onProfileButtonClicked() +{ + if (!mActivePanel) + return; + + mActivePanel->onShowProfile(); +} + bool LLPanelPlaces::onOverflowMenuItemEnable(const LLSD& param) { std::string value = param.asString(); @@ -1060,8 +1071,11 @@ void LLPanelPlaces::updateVerbs() mSaveBtn->setVisible(isLandmarkEditModeOn); mCancelBtn->setVisible(isLandmarkEditModeOn); mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn); + mPlaceInfoBtn->setVisible(mPlaceInfoType != LANDMARK_INFO_TYPE && mPlaceInfoType != TELEPORT_HISTORY_INFO_TYPE + && !is_create_landmark_visible && !isLandmarkEditModeOn); mShowOnMapBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos); + mPlaceInfoBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos); if (is_place_info_visible) { -- cgit v1.2.3