summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaces.cpp
diff options
context:
space:
mode:
authorPaul Guslisty <pguslisty@productengine.com>2010-04-08 08:06:40 +0300
committerPaul Guslisty <pguslisty@productengine.com>2010-04-08 08:06:40 +0300
commit66b3fbf17624d0127b40f6b083b00aa2837738e9 (patch)
tree7d9f18f6ac7dbbd8aa2dd188899c0dafdb6ddb58 /indra/newview/llpanelplaces.cpp
parent76e50ba3ccfc15f115550d20626da037641255a2 (diff)
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
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r--indra/newview/llpanelplaces.cpp14
1 files changed, 14 insertions, 0 deletions
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<LLButton>("overflow_btn");
mOverflowBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onOverflowButtonClicked, this));
+ mPlaceInfoBtn = getChild<LLButton>("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)
{