diff options
author | Paul Guslisty <pguslisty@productengine.com> | 2010-04-08 08:06:40 +0300 |
---|---|---|
committer | Paul Guslisty <pguslisty@productengine.com> | 2010-04-08 08:06:40 +0300 |
commit | 66b3fbf17624d0127b40f6b083b00aa2837738e9 (patch) | |
tree | 7d9f18f6ac7dbbd8aa2dd188899c0dafdb6ddb58 /indra/newview/llpanellandmarks.cpp | |
parent | 76e50ba3ccfc15f115550d20626da037641255a2 (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/llpanellandmarks.cpp')
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 8d8c996374..a1cdbdad59 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -280,6 +280,17 @@ void LLLandmarksPanel::onShowOnMap() doActionOnCurSelectedLandmark(boost::bind(&LLLandmarksPanel::doShowOnMap, this, _1)); } +//virtual +void LLLandmarksPanel::onShowProfile() +{ + LLFolderViewItem* cur_item = getCurSelectedItem(); + + if(!cur_item) + return; + + cur_item->getListener()->performAction(mCurrentSelectedList->getModel(),"about"); +} + // virtual void LLLandmarksPanel::onTeleport() { @@ -306,6 +317,7 @@ void LLLandmarksPanel::updateVerbs() bool landmark_selected = isLandmarkSelected(); mTeleportBtn->setEnabled(landmark_selected && isActionEnabled("teleport")); mShowOnMapBtn->setEnabled(landmark_selected && isActionEnabled("show_on_map")); + mShowProfile->setEnabled(landmark_selected && isActionEnabled("more_info")); // TODO: mantipov: Uncomment when mShareBtn is supported // Share button should be enabled when neither a folder nor a landmark is selected @@ -977,13 +989,10 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const void LLLandmarksPanel::onCustomAction(const LLSD& userdata) { - LLFolderViewItem* cur_item = getCurSelectedItem(); - if(!cur_item) - return; std::string command_name = userdata.asString(); if("more_info" == command_name) { - cur_item->getListener()->performAction(mCurrentSelectedList->getModel(),"about"); + onShowProfile(); } else if ("teleport" == command_name) { |