diff options
author | Josh Bell <josh@lindenlab.com> | 2007-11-01 22:02:35 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2007-11-01 22:02:35 +0000 |
commit | 7afa8058aae0d5363cc19c7df1e6d2d7ec3bf7ac (patch) | |
tree | 52f41bda3e57a58e968421212a8a48eead6f653d /indra/newview/llinventorybridge.cpp | |
parent | 833e8d5c2a1dd48fd89b8b438dbe56572697bb76 (diff) |
svn merge -r 72652:72881 svn+ssh://svn.lindenlab.com/svn/linden/branches/sl-search-11 --> release
QAR-11: pair-reviewed the merge w/ Sam.
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 505364f98c..f777e09813 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1845,7 +1845,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) else if(isAgentInventory()) // do not allow creating in library { // only mature accounts can create undershirts/underwear - /*if (gAgent.mAccess >= SIM_ACCESS_MATURE) + /*if (!gAgent.isTeen()) { sub_menu->append(new LLMenuItemCallGL("New Undershirt", &createNewUndershirt, @@ -2524,6 +2524,14 @@ void LLLandmarkBridge::performAction(LLFolderView* folder, LLInventoryModel* mod } } } + if ("about" == action) + { + LLViewerInventoryItem* item = getItem(); + if(item) + { + open_landmark(item, LLString(" ") + getPrefix() + item->getName(), FALSE); + } + } else LLItemBridge::performAction(folder, model, action); } @@ -2555,12 +2563,35 @@ void open_landmark(LLViewerInventoryItem* inv_item, } } +static void open_landmark_callback(S32 option, void* data) +{ + LLUUID* asset_idp = (LLUUID*)data; + if (option == 0) + { + // HACK: This is to demonstrate teleport on double click for landmarks + gAgent.teleportViaLandmark( *asset_idp ); + + // we now automatically track the landmark you're teleporting to + // because you'll probably arrive at a telehub instead + if( gFloaterWorldMap ) + { + gFloaterWorldMap->trackLandmark( *asset_idp ); + } + } + delete asset_idp; +} + void LLLandmarkBridge::openItem() { LLViewerInventoryItem* item = getItem(); if( item ) { - open_landmark(item, LLString(" ") + getPrefix() + item->getName(), FALSE); + // Opening (double-clicking) a landmark immediately teleports, + // but warns you the first time. + // open_landmark(item, LLString(" ") + getPrefix() + item->getName(), FALSE); + LLUUID* asset_idp = new LLUUID(item->getAssetUUID()); + LLAlertDialog::showXml("TeleportFromLandmark", + open_landmark_callback, (void*)asset_idp); } } @@ -4463,7 +4494,7 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, EWearableType type = wearable->getType(); if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR ) ) //&& - //!((gAgent.mAccess >= SIM_ACCESS_MATURE) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) ) + //!((!gAgent.isTeen()) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) ) { gAgent.removeWearable( type ); } |