summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaces.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-08-18 16:54:34 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-08-18 16:54:34 +0000
commit0710d0da2ba0d4c0fe66b890f1598d8df7ea4917 (patch)
treecb9323d21b0316a5c2cdfa9143b7f4355c6188f1 /indra/newview/llpanelplaces.cpp
parentac1b723fd79b63a9dab94c839d3c0acb2ddde129 (diff)
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1378 https://svn.aws.productengine.com/secondlife/pe/stable-1@1386 -> viewer-2.0.0-3
EXT-357 EXT-370 EXT-385 EXT-409 EXT-472 EXT-479 EXT-513 EXT-532 EXT-541 EXT-544 EXT-546
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r--indra/newview/llpanelplaces.cpp36
1 files changed, 24 insertions, 12 deletions
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 41be268483..39f7d41a8d 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -301,16 +301,6 @@ void LLPanelPlaces::onShareButtonClicked()
}
*/
-void LLPanelPlaces::copySLURL()
-{
- LLLandmarkActions::getSLURLfromPosGlobal(mPosGlobal, boost::bind(&onSLURLBuilt, _1));
-}
-
-void LLPanelPlaces::deleteLandmark()
-{
- gInventory.removeItem(mItem->getUUID());
-}
-
void LLPanelPlaces::onTeleportButtonClicked()
{
if (!mPlaceInfo)
@@ -398,6 +388,17 @@ void LLPanelPlaces::onOverflowButtonClicked()
else if (is_landmark_info_visible && mLandmarkMenu != NULL)
{
menu = mLandmarkMenu;
+
+ BOOL is_landmark_removable = FALSE;
+ if (mItem.notNull())
+ {
+ const LLUUID& item_id = mItem->getUUID();
+ const LLUUID& trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH);
+ is_landmark_removable = gInventory.isObjectDescendentOf(item_id, gInventory.getRootFolderID()) &&
+ !gInventory.isObjectDescendentOf(item_id, trash_id);
+ }
+
+ menu->getChild<LLMenuItemCallGL>("delete")->setEnabled(is_landmark_removable);
}
else
{
@@ -422,11 +423,22 @@ void LLPanelPlaces::onOverflowMenuItemClicked(const LLSD& param)
}
else if (item == "copy")
{
- copySLURL();
+ LLLandmarkActions::getSLURLfromPosGlobal(mPosGlobal, boost::bind(&onSLURLBuilt, _1));
}
else if (item == "delete")
{
- deleteLandmark();
+ gInventory.removeItem(mItem->getUUID());
+
+ onBackButtonClicked();
+ }
+ else if (item == "pick")
+ {
+ if (!mPlaceInfo)
+ return;
+
+ mPlaceInfo->createPick(mPosGlobal);
+
+ onBackButtonClicked();
}
}