diff options
author | Jacek Antonelli | 2008-08-15 23:45:16 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:16 -0500 |
commit | 3f27ba891ac4d032753b219b4b96d1ffbc9fb488 (patch) | |
tree | 504932ee91a0356fba7ea48798887c96867e492f /linden/indra/newview/llinventorybridge.cpp | |
parent | Second Life viewer sources 1.18.4.3 (diff) | |
download | meta-impy-3f27ba891ac4d032753b219b4b96d1ffbc9fb488.zip meta-impy-3f27ba891ac4d032753b219b4b96d1ffbc9fb488.tar.gz meta-impy-3f27ba891ac4d032753b219b4b96d1ffbc9fb488.tar.bz2 meta-impy-3f27ba891ac4d032753b219b4b96d1ffbc9fb488.tar.xz |
Second Life viewer sources 1.18.5.0-RC
Diffstat (limited to 'linden/indra/newview/llinventorybridge.cpp')
-rw-r--r-- | linden/indra/newview/llinventorybridge.cpp | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index 505364f..f777e09 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp | |||
@@ -1845,7 +1845,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
1845 | else if(isAgentInventory()) // do not allow creating in library | 1845 | else if(isAgentInventory()) // do not allow creating in library |
1846 | { | 1846 | { |
1847 | // only mature accounts can create undershirts/underwear | 1847 | // only mature accounts can create undershirts/underwear |
1848 | /*if (gAgent.mAccess >= SIM_ACCESS_MATURE) | 1848 | /*if (!gAgent.isTeen()) |
1849 | { | 1849 | { |
1850 | sub_menu->append(new LLMenuItemCallGL("New Undershirt", | 1850 | sub_menu->append(new LLMenuItemCallGL("New Undershirt", |
1851 | &createNewUndershirt, | 1851 | &createNewUndershirt, |
@@ -2524,6 +2524,14 @@ void LLLandmarkBridge::performAction(LLFolderView* folder, LLInventoryModel* mod | |||
2524 | } | 2524 | } |
2525 | } | 2525 | } |
2526 | } | 2526 | } |
2527 | if ("about" == action) | ||
2528 | { | ||
2529 | LLViewerInventoryItem* item = getItem(); | ||
2530 | if(item) | ||
2531 | { | ||
2532 | open_landmark(item, LLString(" ") + getPrefix() + item->getName(), FALSE); | ||
2533 | } | ||
2534 | } | ||
2527 | else LLItemBridge::performAction(folder, model, action); | 2535 | else LLItemBridge::performAction(folder, model, action); |
2528 | } | 2536 | } |
2529 | 2537 | ||
@@ -2555,12 +2563,35 @@ void open_landmark(LLViewerInventoryItem* inv_item, | |||
2555 | } | 2563 | } |
2556 | } | 2564 | } |
2557 | 2565 | ||
2566 | static void open_landmark_callback(S32 option, void* data) | ||
2567 | { | ||
2568 | LLUUID* asset_idp = (LLUUID*)data; | ||
2569 | if (option == 0) | ||
2570 | { | ||
2571 | // HACK: This is to demonstrate teleport on double click for landmarks | ||
2572 | gAgent.teleportViaLandmark( *asset_idp ); | ||
2573 | |||
2574 | // we now automatically track the landmark you're teleporting to | ||
2575 | // because you'll probably arrive at a telehub instead | ||
2576 | if( gFloaterWorldMap ) | ||
2577 | { | ||
2578 | gFloaterWorldMap->trackLandmark( *asset_idp ); | ||
2579 | } | ||
2580 | } | ||
2581 | delete asset_idp; | ||
2582 | } | ||
2583 | |||
2558 | void LLLandmarkBridge::openItem() | 2584 | void LLLandmarkBridge::openItem() |
2559 | { | 2585 | { |
2560 | LLViewerInventoryItem* item = getItem(); | 2586 | LLViewerInventoryItem* item = getItem(); |
2561 | if( item ) | 2587 | if( item ) |
2562 | { | 2588 | { |
2563 | open_landmark(item, LLString(" ") + getPrefix() + item->getName(), FALSE); | 2589 | // Opening (double-clicking) a landmark immediately teleports, |
2590 | // but warns you the first time. | ||
2591 | // open_landmark(item, LLString(" ") + getPrefix() + item->getName(), FALSE); | ||
2592 | LLUUID* asset_idp = new LLUUID(item->getAssetUUID()); | ||
2593 | LLAlertDialog::showXml("TeleportFromLandmark", | ||
2594 | open_landmark_callback, (void*)asset_idp); | ||
2564 | } | 2595 | } |
2565 | } | 2596 | } |
2566 | 2597 | ||
@@ -4463,7 +4494,7 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, | |||
4463 | EWearableType type = wearable->getType(); | 4494 | EWearableType type = wearable->getType(); |
4464 | 4495 | ||
4465 | if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR ) ) //&& | 4496 | if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR ) ) //&& |
4466 | //!((gAgent.mAccess >= SIM_ACCESS_MATURE) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) ) | 4497 | //!((!gAgent.isTeen()) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) ) |
4467 | { | 4498 | { |
4468 | gAgent.removeWearable( type ); | 4499 | gAgent.removeWearable( type ); |
4469 | } | 4500 | } |