diff options
Diffstat (limited to 'linden/indra/newview/llviewermenu.cpp')
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 1034 |
1 files changed, 995 insertions, 39 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index e9bd756..b129bff 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -176,6 +176,7 @@ | |||
176 | #include "lltool.h" | 176 | #include "lltool.h" |
177 | #include "lltoolbar.h" | 177 | #include "lltoolbar.h" |
178 | #include "lltoolcomp.h" | 178 | #include "lltoolcomp.h" |
179 | #include "lltoolface.h" | ||
179 | #include "lltoolfocus.h" | 180 | #include "lltoolfocus.h" |
180 | #include "lltoolgrab.h" | 181 | #include "lltoolgrab.h" |
181 | #include "lltoolmgr.h" | 182 | #include "lltoolmgr.h" |
@@ -218,6 +219,10 @@ | |||
218 | #include "llfloaternotificationsconsole.h" | 219 | #include "llfloaternotificationsconsole.h" |
219 | 220 | ||
220 | #include "lltexlayer.h" | 221 | #include "lltexlayer.h" |
222 | #include "primbackup.h" | ||
223 | |||
224 | #include "jcfloater_animation_list.h" | ||
225 | #include "llfloaterassetbrowser.h" | ||
221 | 226 | ||
222 | using namespace LLVOAvatarDefines; | 227 | using namespace LLVOAvatarDefines; |
223 | void init_client_menu(LLMenuGL* menu); | 228 | void init_client_menu(LLMenuGL* menu); |
@@ -229,6 +234,13 @@ void init_debug_ui_menu(LLMenuGL* menu); | |||
229 | void init_debug_xui_menu(LLMenuGL* menu); | 234 | void init_debug_xui_menu(LLMenuGL* menu); |
230 | void init_debug_avatar_menu(LLMenuGL* menu); | 235 | void init_debug_avatar_menu(LLMenuGL* menu); |
231 | void init_debug_baked_texture_menu(LLMenuGL* menu); | 236 | void init_debug_baked_texture_menu(LLMenuGL* menu); |
237 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
238 | #ifdef RLV_DEBUG_TESTS | ||
239 | #include "rlvtest.h" | ||
240 | #endif // RLV_DEBUG_TESTS | ||
241 | #include "rlvfloaterbehaviour.h" | ||
242 | void init_debug_rlva_menu(LLMenuGL* menu); | ||
243 | // [/RLVa:KB] | ||
232 | 244 | ||
233 | BOOL enable_land_build(void*); | 245 | BOOL enable_land_build(void*); |
234 | BOOL enable_object_build(void*); | 246 | BOOL enable_object_build(void*); |
@@ -490,6 +502,7 @@ BOOL enable_detach(void*); | |||
490 | BOOL enable_region_owner(void*); | 502 | BOOL enable_region_owner(void*); |
491 | void menu_toggle_attached_lights(void* user_data); | 503 | void menu_toggle_attached_lights(void* user_data); |
492 | void menu_toggle_attached_particles(void* user_data); | 504 | void menu_toggle_attached_particles(void* user_data); |
505 | static void handle_go_to_callback(S32 option, void *userdata); | ||
493 | 506 | ||
494 | class LLMenuParcelObserver : public LLParcelObserver | 507 | class LLMenuParcelObserver : public LLParcelObserver |
495 | { | 508 | { |
@@ -572,6 +585,11 @@ void set_underclothes_menu_options() | |||
572 | 585 | ||
573 | void init_menus() | 586 | void init_menus() |
574 | { | 587 | { |
588 | if (gMenuHolder) | ||
589 | { | ||
590 | cleanup_menus(); | ||
591 | } | ||
592 | |||
575 | S32 top = gViewerWindow->getRootView()->getRect().getHeight(); | 593 | S32 top = gViewerWindow->getRootView()->getRect().getHeight(); |
576 | S32 width = gViewerWindow->getRootView()->getRect().getWidth(); | 594 | S32 width = gViewerWindow->getRootView()->getRect().getWidth(); |
577 | 595 | ||
@@ -758,6 +776,7 @@ void init_client_menu(LLMenuGL* menu) | |||
758 | 776 | ||
759 | sub->appendSeparator(); | 777 | sub->appendSeparator(); |
760 | 778 | ||
779 | // For Imprudence 1.3 - need to XUIfy | ||
761 | // Debugging view for unified notifications | 780 | // Debugging view for unified notifications |
762 | sub->append(new LLMenuItemCallGL("Notifications Console...", | 781 | sub->append(new LLMenuItemCallGL("Notifications Console...", |
763 | &handle_show_notifications_console, NULL, NULL, '5', MASK_CONTROL|MASK_SHIFT )); | 782 | &handle_show_notifications_console, NULL, NULL, '5', MASK_CONTROL|MASK_SHIFT )); |
@@ -842,6 +861,19 @@ void init_client_menu(LLMenuGL* menu) | |||
842 | init_debug_world_menu(sub_menu); | 861 | init_debug_world_menu(sub_menu); |
843 | menu->appendMenu(sub_menu); | 862 | menu->appendMenu(sub_menu); |
844 | 863 | ||
864 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.1b | ||
865 | #ifdef RLV_ADVANCED_MENU | ||
866 | if (rlv_handler_t::isEnabled()) | ||
867 | { | ||
868 | sub_menu = new LLMenuGL("RLVa"); | ||
869 | init_debug_rlva_menu(sub_menu); | ||
870 | menu->appendMenu(sub_menu); | ||
871 | sub_menu->setVisible(rlv_handler_t::isEnabled()); | ||
872 | sub_menu->setEnabled(rlv_handler_t::isEnabled()); | ||
873 | } | ||
874 | #endif // RLV_ADVANCED_MENU | ||
875 | // [/RLVa:KB] | ||
876 | |||
845 | sub_menu = new LLMenuGL("UI"); | 877 | sub_menu = new LLMenuGL("UI"); |
846 | init_debug_ui_menu(sub_menu); | 878 | init_debug_ui_menu(sub_menu); |
847 | menu->appendMenu(sub_menu); | 879 | menu->appendMenu(sub_menu); |
@@ -936,6 +968,13 @@ void init_client_menu(LLMenuGL* menu) | |||
936 | &menu_check_control, | 968 | &menu_check_control, |
937 | (void*)"ShowConsoleWindow")); | 969 | (void*)"ShowConsoleWindow")); |
938 | 970 | ||
971 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-1.0.0e | ||
972 | #ifdef RLV_ADVANCED_TOGGLE_RLVA | ||
973 | if (gSavedSettings.controlExists(RLV_SETTING_MAIN)) | ||
974 | menu->append(new LLMenuItemCheckGL("Restrained Life API", &rlvToggleEnabled, NULL, &rlvGetEnabled, NULL)); | ||
975 | #endif // RLV_ADVANCED_TOGGLE_RLVA | ||
976 | // [/RLVa:KB] | ||
977 | |||
939 | if(gSavedSettings.getBOOL("QAMode")) | 978 | if(gSavedSettings.getBOOL("QAMode")) |
940 | { | 979 | { |
941 | LLMenuGL* sub = NULL; | 980 | LLMenuGL* sub = NULL; |
@@ -1023,12 +1062,15 @@ extern BOOL gDebugSelectMgr; | |||
1023 | 1062 | ||
1024 | void init_debug_ui_menu(LLMenuGL* menu) | 1063 | void init_debug_ui_menu(LLMenuGL* menu) |
1025 | { | 1064 | { |
1026 | menu->append(new LLMenuItemCheckGL("Rotate Mini-Map", menu_toggle_control, NULL, menu_check_control, (void*)"MiniMapRotate")); | 1065 | // For Imprudence 1.3 - need to XUIfy |
1027 | menu->append(new LLMenuItemCheckGL("Use default system color picker", menu_toggle_control, NULL, menu_check_control, (void*)"UseDefaultColorPicker")); | 1066 | menu->append(new LLMenuItemCheckGL("Use default system color picker", menu_toggle_control, NULL, menu_check_control, (void*)"UseDefaultColorPicker")); |
1067 | // For Imprudence 1.3 - need to XUIfy | ||
1028 | menu->append(new LLMenuItemCheckGL("Show search panel in overlay bar", menu_toggle_control, NULL, menu_check_control, (void*)"ShowSearchBar")); | 1068 | menu->append(new LLMenuItemCheckGL("Show search panel in overlay bar", menu_toggle_control, NULL, menu_check_control, (void*)"ShowSearchBar")); |
1029 | menu->appendSeparator(); | 1069 | menu->appendSeparator(); |
1030 | 1070 | ||
1071 | // For Imprudence 1.3 - need to XUIfy | ||
1031 | menu->append(new LLMenuItemCallGL("Web Browser Test", &handle_web_browser_test)); | 1072 | menu->append(new LLMenuItemCallGL("Web Browser Test", &handle_web_browser_test)); |
1073 | // For Imprudence 1.3 - need to XUIfy | ||
1032 | // commented out until work is complete: DEV-32268 | 1074 | // commented out until work is complete: DEV-32268 |
1033 | // menu->append(new LLMenuItemCallGL("Buy Currency Test", &handle_buy_currency_test)); | 1075 | // menu->append(new LLMenuItemCallGL("Buy Currency Test", &handle_buy_currency_test)); |
1034 | menu->append(new LLMenuItemCallGL("Editable UI", &edit_ui)); | 1076 | menu->append(new LLMenuItemCallGL("Editable UI", &edit_ui)); |
@@ -1054,6 +1096,7 @@ void init_debug_ui_menu(LLMenuGL* menu) | |||
1054 | menu->appendSeparator(); | 1096 | menu->appendSeparator(); |
1055 | menu->append(new LLMenuItemCheckGL("Show Time", menu_toggle_control, NULL, menu_check_control, (void*)"DebugShowTime")); | 1097 | menu->append(new LLMenuItemCheckGL("Show Time", menu_toggle_control, NULL, menu_check_control, (void*)"DebugShowTime")); |
1056 | menu->append(new LLMenuItemCheckGL("Show Render Info", menu_toggle_control, NULL, menu_check_control, (void*)"DebugShowRenderInfo")); | 1098 | menu->append(new LLMenuItemCheckGL("Show Render Info", menu_toggle_control, NULL, menu_check_control, (void*)"DebugShowRenderInfo")); |
1099 | // For Imprudence 1.3 - need to XUIfy | ||
1057 | menu->append(new LLMenuItemCheckGL("Show Matrices", menu_toggle_control, NULL, menu_check_control, (void*)"DebugShowRenderMatrices")); | 1100 | menu->append(new LLMenuItemCheckGL("Show Matrices", menu_toggle_control, NULL, menu_check_control, (void*)"DebugShowRenderMatrices")); |
1058 | menu->append(new LLMenuItemCheckGL("Show Color Under Cursor", menu_toggle_control, NULL, menu_check_control, (void*)"DebugShowColor")); | 1101 | menu->append(new LLMenuItemCheckGL("Show Color Under Cursor", menu_toggle_control, NULL, menu_check_control, (void*)"DebugShowColor")); |
1059 | 1102 | ||
@@ -1063,6 +1106,7 @@ void init_debug_ui_menu(LLMenuGL* menu) | |||
1063 | void init_debug_xui_menu(LLMenuGL* menu) | 1106 | void init_debug_xui_menu(LLMenuGL* menu) |
1064 | { | 1107 | { |
1065 | menu->append(new LLMenuItemCallGL("Floater Test...", LLFloaterTest::show)); | 1108 | menu->append(new LLMenuItemCallGL("Floater Test...", LLFloaterTest::show)); |
1109 | // For Imprudence 1.3 - need to XUIfy | ||
1066 | menu->append(new LLMenuItemCallGL("Font Test...", LLFloaterFontTest::show)); | 1110 | menu->append(new LLMenuItemCallGL("Font Test...", LLFloaterFontTest::show)); |
1067 | menu->append(new LLMenuItemCallGL("Export Menus to XML...", handle_export_menus_to_xml)); | 1111 | menu->append(new LLMenuItemCallGL("Export Menus to XML...", handle_export_menus_to_xml)); |
1068 | menu->append(new LLMenuItemCallGL("Edit UI...", LLFloaterEditUI::show)); | 1112 | menu->append(new LLMenuItemCallGL("Edit UI...", LLFloaterEditUI::show)); |
@@ -1193,6 +1237,7 @@ void init_debug_rendering_menu(LLMenuGL* menu) | |||
1193 | sub_menu->append(new LLMenuItemCheckGL("Octree", &LLPipeline::toggleRenderDebug, NULL, | 1237 | sub_menu->append(new LLMenuItemCheckGL("Octree", &LLPipeline::toggleRenderDebug, NULL, |
1194 | &LLPipeline::toggleRenderDebugControl, | 1238 | &LLPipeline::toggleRenderDebugControl, |
1195 | (void*)LLPipeline::RENDER_DEBUG_OCTREE)); | 1239 | (void*)LLPipeline::RENDER_DEBUG_OCTREE)); |
1240 | // For Imprudence 1.3 - need to XUIfy | ||
1196 | sub_menu->append(new LLMenuItemCheckGL("Shadow Frusta", &LLPipeline::toggleRenderDebug, NULL, | 1241 | sub_menu->append(new LLMenuItemCheckGL("Shadow Frusta", &LLPipeline::toggleRenderDebug, NULL, |
1197 | &LLPipeline::toggleRenderDebugControl, | 1242 | &LLPipeline::toggleRenderDebugControl, |
1198 | (void*)LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA)); | 1243 | (void*)LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA)); |
@@ -1365,14 +1410,17 @@ void init_debug_avatar_menu(LLMenuGL* menu) | |||
1365 | //menu->append(new LLMenuItemToggleGL("Show Attachment Points", &LLVOAvatar::sShowAttachmentPoints)); | 1410 | //menu->append(new LLMenuItemToggleGL("Show Attachment Points", &LLVOAvatar::sShowAttachmentPoints)); |
1366 | //diabling collision plane due to DEV-14477 -brad | 1411 | //diabling collision plane due to DEV-14477 -brad |
1367 | //menu->append(new LLMenuItemToggleGL("Show Collision Plane", &LLVOAvatar::sShowFootPlane)); | 1412 | //menu->append(new LLMenuItemToggleGL("Show Collision Plane", &LLVOAvatar::sShowFootPlane)); |
1413 | // For Imprudence 1.3 - need to XUIfy | ||
1368 | menu->append(new LLMenuItemCheckGL("Show Collision Skeleton", | 1414 | menu->append(new LLMenuItemCheckGL("Show Collision Skeleton", |
1369 | &LLPipeline::toggleRenderDebug, NULL, | 1415 | &LLPipeline::toggleRenderDebug, NULL, |
1370 | &LLPipeline::toggleRenderDebugControl, | 1416 | &LLPipeline::toggleRenderDebugControl, |
1371 | (void*)LLPipeline::RENDER_DEBUG_AVATAR_VOLUME)); | 1417 | (void*)LLPipeline::RENDER_DEBUG_AVATAR_VOLUME)); |
1418 | // For Imprudence 1.3 - need to XUIfy | ||
1372 | menu->append(new LLMenuItemCheckGL("Display Agent Target", | 1419 | menu->append(new LLMenuItemCheckGL("Display Agent Target", |
1373 | &LLPipeline::toggleRenderDebug, NULL, | 1420 | &LLPipeline::toggleRenderDebug, NULL, |
1374 | &LLPipeline::toggleRenderDebugControl, | 1421 | &LLPipeline::toggleRenderDebugControl, |
1375 | (void*)LLPipeline::RENDER_DEBUG_AGENT_TARGET)); | 1422 | (void*)LLPipeline::RENDER_DEBUG_AGENT_TARGET)); |
1423 | // For Imprudence 1.3 - need to XUIfy | ||
1376 | menu->append(new LLMenuItemToggleGL( "Debug Rotation", &LLVOAvatar::sDebugAvatarRotation)); | 1424 | menu->append(new LLMenuItemToggleGL( "Debug Rotation", &LLVOAvatar::sDebugAvatarRotation)); |
1377 | menu->append(new LLMenuItemCallGL("Dump Attachments", handle_dump_attachments)); | 1425 | menu->append(new LLMenuItemCallGL("Dump Attachments", handle_dump_attachments)); |
1378 | menu->append(new LLMenuItemCallGL("Refresh Appearance", handle_rebake_textures, NULL, NULL, 'R', MASK_ALT | MASK_CONTROL )); | 1426 | menu->append(new LLMenuItemCallGL("Refresh Appearance", handle_rebake_textures, NULL, NULL, 'R', MASK_ALT | MASK_CONTROL )); |
@@ -1390,10 +1438,58 @@ void init_debug_baked_texture_menu(LLMenuGL* menu) | |||
1390 | menu->append(new LLMenuItemCallGL("Upper Body", handle_grab_texture, enable_grab_texture, (void*) TEX_UPPER_BAKED)); | 1438 | menu->append(new LLMenuItemCallGL("Upper Body", handle_grab_texture, enable_grab_texture, (void*) TEX_UPPER_BAKED)); |
1391 | menu->append(new LLMenuItemCallGL("Lower Body", handle_grab_texture, enable_grab_texture, (void*) TEX_LOWER_BAKED)); | 1439 | menu->append(new LLMenuItemCallGL("Lower Body", handle_grab_texture, enable_grab_texture, (void*) TEX_LOWER_BAKED)); |
1392 | menu->append(new LLMenuItemCallGL("Skirt", handle_grab_texture, enable_grab_texture, (void*) TEX_SKIRT_BAKED)); | 1440 | menu->append(new LLMenuItemCallGL("Skirt", handle_grab_texture, enable_grab_texture, (void*) TEX_SKIRT_BAKED)); |
1441 | // For Imprudence 1.3 - need to XUIfy | ||
1393 | menu->append(new LLMenuItemCallGL("Hair", handle_grab_texture, enable_grab_texture, (void*) TEX_HAIR_BAKED)); | 1442 | menu->append(new LLMenuItemCallGL("Hair", handle_grab_texture, enable_grab_texture, (void*) TEX_HAIR_BAKED)); |
1394 | menu->createJumpKeys(); | 1443 | menu->createJumpKeys(); |
1395 | } | 1444 | } |
1396 | 1445 | ||
1446 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-1.0.0g | ||
1447 | void init_debug_rlva_menu(LLMenuGL* menu) | ||
1448 | { | ||
1449 | // Debug options | ||
1450 | { | ||
1451 | LLMenuGL* pDbgMenu = new LLMenuGL("Debug"); | ||
1452 | |||
1453 | if (gSavedSettings.controlExists(RLV_SETTING_DEBUG)) | ||
1454 | pDbgMenu->append(new LLMenuItemCheckGL("Show Debug Messages", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_DEBUG)); | ||
1455 | pDbgMenu->appendSeparator(); | ||
1456 | if (gSavedSettings.controlExists(RLV_SETTING_ENABLELEGACYNAMING)) | ||
1457 | pDbgMenu->append(new LLMenuItemCheckGL("Enable Legacy Naming", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_ENABLELEGACYNAMING)); | ||
1458 | |||
1459 | menu->appendMenu(pDbgMenu); | ||
1460 | menu->appendSeparator(); | ||
1461 | } | ||
1462 | |||
1463 | #ifdef RLV_EXTENSION_ENABLE_WEAR | ||
1464 | if (gSavedSettings.controlExists(RLV_SETTING_ENABLEWEAR)) | ||
1465 | menu->append(new LLMenuItemCheckGL("Enable Wear", menu_toggle_control, rlvEnableWearEnabler, menu_check_control, (void*)RLV_SETTING_ENABLEWEAR)); | ||
1466 | menu->appendSeparator(); | ||
1467 | #endif // RLV_EXTENSION_ENABLE_WEAR | ||
1468 | |||
1469 | #ifdef RLV_EXTENSION_HIDELOCKED | ||
1470 | if ( (gSavedSettings.controlExists(RLV_SETTING_HIDELOCKEDLAYER)) && | ||
1471 | (gSavedSettings.controlExists(RLV_SETTING_HIDELOCKEDATTACH)) ) | ||
1472 | { | ||
1473 | menu->append(new LLMenuItemCheckGL("Hide locked layers", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_HIDELOCKEDLAYER)); | ||
1474 | menu->append(new LLMenuItemCheckGL("Hide locked attachments", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_HIDELOCKEDATTACH)); | ||
1475 | //sub_menu->append(new LLMenuItemToggleGL("Hide locked inventory", &rlv_handler_t::fHideLockedInventory)); | ||
1476 | menu->appendSeparator(); | ||
1477 | } | ||
1478 | #endif // RLV_EXTENSION_HIDELOCKED | ||
1479 | |||
1480 | if (gSavedSettings.controlExists(RLV_SETTING_FORBIDGIVETORLV)) | ||
1481 | menu->append(new LLMenuItemCheckGL("Forbid Give to #RLV", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_FORBIDGIVETORLV)); | ||
1482 | if (gSavedSettings.controlExists(RLV_SETTING_ENABLELEGACYNAMING)) | ||
1483 | menu->append(new LLMenuItemCheckGL("Show Name Tags", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_SHOWNAMETAGS)); | ||
1484 | menu->appendSeparator(); | ||
1485 | |||
1486 | #ifdef RLV_EXTENSION_FLOATER_RESTRICTIONS | ||
1487 | // TODO-RLVa: figure out a way to tell if floater_rlv_behaviour.xml exists | ||
1488 | menu->append(new LLMenuItemCallGL("Restrictions...", RlvFloaterBehaviour::show, NULL, NULL)); | ||
1489 | #endif // RLV_EXTENSION_FLOATER_RESTRICTIONS | ||
1490 | } | ||
1491 | // [/RLVa:KB] | ||
1492 | |||
1397 | void init_server_menu(LLMenuGL* menu) | 1493 | void init_server_menu(LLMenuGL* menu) |
1398 | { | 1494 | { |
1399 | { | 1495 | { |
@@ -1546,6 +1642,16 @@ class LLObjectTouch : public view_listener_t | |||
1546 | 1642 | ||
1547 | LLPickInfo pick = LLToolPie::getInstance()->getPick(); | 1643 | LLPickInfo pick = LLToolPie::getInstance()->getPick(); |
1548 | 1644 | ||
1645 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f | ||
1646 | // TODO-RLVa: this code is rather redundant since we'll never get an active selection to show a pie menu for | ||
1647 | // [msg->addVector3("Position", pick.mIntersection) <- see llDetectedTouchPos()] | ||
1648 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && ((!object->isAttachment()) || (!object->permYouOwner())) && | ||
1649 | (dist_vec_squared(gAgent.getPositionAgent(), pick.mIntersection) > 1.5f * 1.5f) ) | ||
1650 | { | ||
1651 | return true; // Can't touch in-world objects (or other avie's attachments) farther than 1.5m away under @fartouch=n | ||
1652 | } | ||
1653 | // [/RLVa:KB] | ||
1654 | |||
1549 | LLMessageSystem *msg = gMessageSystem; | 1655 | LLMessageSystem *msg = gMessageSystem; |
1550 | 1656 | ||
1551 | msg->newMessageFast(_PREHASH_ObjectGrab); | 1657 | msg->newMessageFast(_PREHASH_ObjectGrab); |
@@ -1594,6 +1700,14 @@ class LLObjectEnableTouch : public view_listener_t | |||
1594 | { | 1700 | { |
1595 | LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); | 1701 | LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); |
1596 | bool new_value = obj && obj->flagHandleTouch(); | 1702 | bool new_value = obj && obj->flagHandleTouch(); |
1703 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f | ||
1704 | // TODO-RLVa: this code is rather redundant since we'll never get an active selection to show a pie menu for | ||
1705 | if ( (new_value) && (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && ((!obj->isAttachment()) || (!obj->permYouOwner())) && | ||
1706 | (dist_vec_squared(gAgent.getPositionAgent(), LLToolPie::getInstance()->getPick().mIntersection) > 1.5f * 1.5f) ) | ||
1707 | { | ||
1708 | new_value = false; // Can't touch in-world objects (or other avie's attachments) farther than 1.5m away under @fartouch=n | ||
1709 | } | ||
1710 | // [/RLVa:KB] | ||
1597 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 1711 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
1598 | 1712 | ||
1599 | // Update label based on the node touch name if available. | 1713 | // Update label based on the node touch name if available. |
@@ -1667,6 +1781,14 @@ class LLObjectOpen : public view_listener_t | |||
1667 | { | 1781 | { |
1668 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 1782 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
1669 | { | 1783 | { |
1784 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) | ||
1785 | // TODO-RLVa: shouldn't we be checking for fartouch here as well? | ||
1786 | if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) | ||
1787 | { | ||
1788 | return true; | ||
1789 | } | ||
1790 | // [/RLVa:KB] | ||
1791 | |||
1670 | return handle_object_open(); | 1792 | return handle_object_open(); |
1671 | } | 1793 | } |
1672 | }; | 1794 | }; |
@@ -1685,6 +1807,12 @@ class LLObjectEnableOpen : public view_listener_t | |||
1685 | if (!root) new_value = false; | 1807 | if (!root) new_value = false; |
1686 | else new_value = root->allowOpen(); | 1808 | else new_value = root->allowOpen(); |
1687 | } | 1809 | } |
1810 | |||
1811 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) | Modified: RLVa-1.0.0b | ||
1812 | // TODO-RLV: shouldn't we be checking for fartouch here as well? (and LLViewerObject::allowOpen() makes this redundant?) | ||
1813 | new_value &= !gRlvHandler.hasBehaviour(RLV_BHVR_EDIT); | ||
1814 | // [/RLVa:KB] | ||
1815 | |||
1688 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 1816 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
1689 | return true; | 1817 | return true; |
1690 | } | 1818 | } |
@@ -1746,7 +1874,13 @@ bool toggle_build_mode() | |||
1746 | } | 1874 | } |
1747 | } | 1875 | } |
1748 | 1876 | ||
1749 | 1877 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | |
1878 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (LLSelectMgr::getInstance()) ) | ||
1879 | { | ||
1880 | LLSelectMgr::getInstance()->deselectAll(); | ||
1881 | } | ||
1882 | // [/RLVa:KB] | ||
1883 | |||
1750 | LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); | 1884 | LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); |
1751 | LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() ); | 1885 | LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() ); |
1752 | 1886 | ||
@@ -1846,6 +1980,23 @@ class LLObjectEdit : public view_listener_t | |||
1846 | { | 1980 | { |
1847 | LLViewerParcelMgr::getInstance()->deselectLand(); | 1981 | LLViewerParcelMgr::getInstance()->deselectLand(); |
1848 | 1982 | ||
1983 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f | ||
1984 | if (rlv_handler_t::isEnabled()) | ||
1985 | { | ||
1986 | if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) | ||
1987 | { | ||
1988 | return true; // Can't edit any object under @edit=n | ||
1989 | } | ||
1990 | else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && | ||
1991 | (SELECT_TYPE_WORLD == LLSelectMgr::getInstance()->getSelection()->getSelectType()) && | ||
1992 | (dist_vec_squared(gAgent.getPositionAgent(), LLToolPie::getInstance()->getPick().mIntersection) > 1.5f * 1.5f) ) | ||
1993 | { | ||
1994 | // TODO-RLVa: this code is rather redundant since we'll never get an active selection to show a pie menu for | ||
1995 | return true; // Can't edit in-world objects farther than 1.5m away under @fartouch=n | ||
1996 | } | ||
1997 | } | ||
1998 | // [/RLVa:KB] | ||
1999 | |||
1849 | if (gAgent.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit()) | 2000 | if (gAgent.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit()) |
1850 | { | 2001 | { |
1851 | LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); | 2002 | LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); |
@@ -1995,6 +2146,22 @@ class LLEnableEdit : public view_listener_t | |||
1995 | enable = LLViewerParcelMgr::getInstance()->agentCanBuild() | 2146 | enable = LLViewerParcelMgr::getInstance()->agentCanBuild() |
1996 | || LLSelectMgr::getInstance()->getSelection()->isAttachment(); | 2147 | || LLSelectMgr::getInstance()->getSelection()->isAttachment(); |
1997 | } | 2148 | } |
2149 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
2150 | // TODO-RLV: include fartouch here? | ||
2151 | if ( (rlv_handler_t::isEnabled()) && (enable) ) | ||
2152 | { | ||
2153 | // We have no way of knowing whether we're being called for "Create" or for "Edit", but we can | ||
2154 | // make an educated guess based on the currently active selection which puts us halfway there. | ||
2155 | BOOL fActiveSelection = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); | ||
2156 | |||
2157 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) | ||
2158 | enable = false; // Edit and rez restricted, disable them both | ||
2159 | else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (fActiveSelection) ) | ||
2160 | enable = false; // Edit restricted and there's an active selection => disable Edit and Create | ||
2161 | else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) && (!fActiveSelection) ) | ||
2162 | enable = false; // Rez restricted and there's no active selection => disable Create | ||
2163 | } | ||
2164 | // [/RLVa:KB] | ||
1998 | gMenuHolder->findControl(userdata["control"].asString())->setValue(enable); | 2165 | gMenuHolder->findControl(userdata["control"].asString())->setValue(enable); |
1999 | return true; | 2166 | return true; |
2000 | } | 2167 | } |
@@ -2022,7 +2189,10 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t | |||
2022 | { | 2189 | { |
2023 | LLVOAvatar::attachment_map_t::iterator curiter = iter++; | 2190 | LLVOAvatar::attachment_map_t::iterator curiter = iter++; |
2024 | LLViewerJointAttachment* attachment = curiter->second; | 2191 | LLViewerJointAttachment* attachment = curiter->second; |
2025 | if (attachment->getObject()) | 2192 | // if (attachment->getObject()) |
2193 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0c | ||
2194 | if ( (attachment->getObject()) && ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.isDetachable(curiter->first)) ) ) | ||
2195 | // [/RLVa:KB] | ||
2026 | { | 2196 | { |
2027 | new_value = true; | 2197 | new_value = true; |
2028 | break; | 2198 | break; |
@@ -2069,6 +2239,9 @@ class LLObjectEnableMute : public view_listener_t | |||
2069 | BOOL is_linden = lastname && !LLStringUtil::compareStrings(lastname->getString(), "Linden"); | 2239 | BOOL is_linden = lastname && !LLStringUtil::compareStrings(lastname->getString(), "Linden"); |
2070 | BOOL is_self = avatar->isSelf(); | 2240 | BOOL is_self = avatar->isSelf(); |
2071 | new_value = !is_linden && !is_self; | 2241 | new_value = !is_linden && !is_self; |
2242 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
2243 | new_value &= (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); | ||
2244 | // [/RLVa:KB] | ||
2072 | } | 2245 | } |
2073 | } | 2246 | } |
2074 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 2247 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
@@ -2089,6 +2262,12 @@ class LLObjectMute : public view_listener_t | |||
2089 | LLVOAvatar* avatar = find_avatar_from_object(object); | 2262 | LLVOAvatar* avatar = find_avatar_from_object(object); |
2090 | if (avatar) | 2263 | if (avatar) |
2091 | { | 2264 | { |
2265 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e | ||
2266 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
2267 | { | ||
2268 | return true; // Fallback code [see LLObjectEnableMute::handleEvent()] | ||
2269 | } | ||
2270 | // [/RLVa:KB] | ||
2092 | id = avatar->getID(); | 2271 | id = avatar->getID(); |
2093 | 2272 | ||
2094 | LLNameValue *firstname = avatar->getNVPair("FirstName"); | 2273 | LLNameValue *firstname = avatar->getNVPair("FirstName"); |
@@ -2137,37 +2316,186 @@ class LLObjectMute : public view_listener_t | |||
2137 | } | 2316 | } |
2138 | }; | 2317 | }; |
2139 | 2318 | ||
2140 | bool handle_go_to() | 2319 | class LLObjectEnableCopyUUID : public view_listener_t |
2141 | { | 2320 | { |
2142 | // JAMESDEBUG try simulator autopilot | 2321 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
2143 | std::vector<std::string> strings; | 2322 | { |
2144 | std::string val; | 2323 | LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); |
2145 | LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal; | 2324 | bool new_value = (object != NULL); |
2146 | val = llformat("%g", pos.mdV[VX]); | 2325 | |
2147 | strings.push_back(val); | 2326 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
2148 | val = llformat("%g", pos.mdV[VY]); | 2327 | return true; |
2149 | strings.push_back(val); | 2328 | } |
2150 | val = llformat("%g", pos.mdV[VZ]); | 2329 | }; |
2151 | strings.push_back(val); | 2330 | |
2152 | send_generic_message("autopilot", strings); | 2331 | class LLObjectCopyUUID : public view_listener_t |
2332 | { | ||
2333 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2334 | { | ||
2335 | LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); | ||
2336 | if (!object) return true; | ||
2337 | |||
2338 | LLUUID id = object->getID(); | ||
2153 | 2339 | ||
2154 | LLViewerParcelMgr::getInstance()->deselectLand(); | 2340 | char buffer[UUID_STR_LENGTH]; |
2341 | id.toString(buffer); | ||
2155 | 2342 | ||
2156 | if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera")) | 2343 | |
2344 | gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer)); | ||
2345 | |||
2346 | LLSelectMgr::getInstance()->deselectAll(); | ||
2347 | return true; | ||
2348 | } | ||
2349 | }; | ||
2350 | |||
2351 | |||
2352 | class LLObjectEnableExport : public view_listener_t | ||
2353 | { | ||
2354 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2157 | { | 2355 | { |
2158 | gAgent.setFocusGlobal(gAgent.getFocusTargetGlobal(), gAgent.getAvatarObject()->getID()); | 2356 | LLControlVariable* control = |
2357 | gMenuHolder->findControl(userdata["control"].asString()); | ||
2358 | |||
2359 | LLViewerObject* object = | ||
2360 | LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); | ||
2361 | |||
2362 | if((object != NULL) && | ||
2363 | (find_avatar_from_object(object) == NULL)) | ||
2364 | { | ||
2365 | struct ff : public LLSelectedNodeFunctor | ||
2366 | { | ||
2367 | virtual bool apply(LLSelectNode* node) | ||
2368 | { | ||
2369 | return primbackup::check_perms( node ); | ||
2370 | } | ||
2371 | } func; | ||
2372 | |||
2373 | if(LLSelectMgr::getInstance()->getSelection()->applyToNodes(&func,false)) | ||
2374 | { | ||
2375 | control->setValue(true); | ||
2376 | return true; | ||
2377 | } | ||
2378 | } | ||
2379 | |||
2380 | control->setValue(false); | ||
2381 | return true; | ||
2159 | } | 2382 | } |
2160 | else | 2383 | }; |
2384 | |||
2385 | class LLObjectExport : public view_listener_t | ||
2386 | { | ||
2387 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2161 | { | 2388 | { |
2162 | // Snap camera back to behind avatar | 2389 | LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); |
2163 | gAgent.setFocusOnAvatar(TRUE, ANIMATE); | 2390 | if (!object) return true; |
2391 | |||
2392 | LLVOAvatar* avatar = find_avatar_from_object(object); | ||
2393 | |||
2394 | if (!avatar) | ||
2395 | { | ||
2396 | primbackup::getInstance()->pre_export_object(); | ||
2397 | } | ||
2398 | |||
2399 | return true; | ||
2164 | } | 2400 | } |
2401 | }; | ||
2165 | 2402 | ||
2166 | // Could be first use | 2403 | |
2167 | LLFirstUse::useGoTo(); | 2404 | class LLObjectEnableImport : public view_listener_t |
2405 | { | ||
2406 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2407 | { | ||
2408 | gMenuHolder->findControl(userdata["control"].asString())->setValue(TRUE); | ||
2409 | return true; | ||
2410 | } | ||
2411 | }; | ||
2412 | |||
2413 | class LLObjectImport : public view_listener_t | ||
2414 | { | ||
2415 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2416 | { | ||
2417 | primbackup::getInstance()->import_object(FALSE); | ||
2418 | return true; | ||
2419 | } | ||
2420 | }; | ||
2421 | |||
2422 | class LLObjectImportUpload : public view_listener_t | ||
2423 | { | ||
2424 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
2425 | { | ||
2426 | primbackup::getInstance()->import_object(TRUE); | ||
2427 | return true; | ||
2428 | } | ||
2429 | }; | ||
2430 | |||
2431 | bool handle_go_to() | ||
2432 | { | ||
2433 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
2434 | if ( (rlv_handler_t::isEnabled()) && gAgent.forwardGrabbed() && (gRlvHandler.hasLockedAttachment()) ) | ||
2435 | { | ||
2436 | return true; | ||
2437 | } | ||
2438 | // [/RLVa:KB] | ||
2439 | |||
2440 | if (gSavedSettings.getBOOL("DoubleClickTeleport")) | ||
2441 | { | ||
2442 | gViewerWindow->alertXml("ConfirmDoubleClickTP", handle_go_to_callback, (void*)LLToolPie::getInstance()); | ||
2443 | } | ||
2444 | else if (gSavedSettings.getBOOL("DoubleClickAutoPilot")) | ||
2445 | { | ||
2446 | gViewerWindow->alertXml("ConfirmAutoPilot", handle_go_to_callback, (void*)LLToolPie::getInstance()); | ||
2447 | } | ||
2168 | return true; | 2448 | return true; |
2169 | } | 2449 | } |
2170 | 2450 | ||
2451 | //static | ||
2452 | void handle_go_to_callback(S32 option, void *userdata) | ||
2453 | { | ||
2454 | if (option == 0) | ||
2455 | { | ||
2456 | LLToolPie* pie = (LLToolPie*)userdata; | ||
2457 | |||
2458 | // JAMESDEBUG try simulator autopilot | ||
2459 | std::vector<std::string> strings; | ||
2460 | std::string val; | ||
2461 | LLVector3d pos = pie->getPick().mPosGlobal; | ||
2462 | if (gSavedSettings.getBOOL("DoubleClickTeleport")) | ||
2463 | { | ||
2464 | LLVector3d hips_offset(0.0f, 0.0f, 1.2f); | ||
2465 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | ||
2466 | gAgent.teleportViaLocation(pos + hips_offset); | ||
2467 | } | ||
2468 | else | ||
2469 | { | ||
2470 | // JAMESDEBUG try simulator autopilot | ||
2471 | std::vector<std::string> strings; | ||
2472 | std::string val; | ||
2473 | val = llformat("%g", pos.mdV[VX]); | ||
2474 | strings.push_back(val); | ||
2475 | val = llformat("%g", pos.mdV[VY]); | ||
2476 | strings.push_back(val); | ||
2477 | val = llformat("%g", pos.mdV[VZ]); | ||
2478 | strings.push_back(val); | ||
2479 | send_generic_message("autopilot", strings); | ||
2480 | |||
2481 | LLViewerParcelMgr::getInstance()->deselectLand(); | ||
2482 | |||
2483 | if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera")) | ||
2484 | { | ||
2485 | gAgent.setFocusGlobal(gAgent.getFocusTargetGlobal(), gAgent.getAvatarObject()->getID()); | ||
2486 | } | ||
2487 | else | ||
2488 | { | ||
2489 | // Snap camera back to behind avatar | ||
2490 | gAgent.setFocusOnAvatar(TRUE, ANIMATE); | ||
2491 | } | ||
2492 | |||
2493 | // Could be first use | ||
2494 | LLFirstUse::useGoTo(); | ||
2495 | } | ||
2496 | } | ||
2497 | } | ||
2498 | |||
2171 | class LLGoToObject : public view_listener_t | 2499 | class LLGoToObject : public view_listener_t |
2172 | { | 2500 | { |
2173 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 2501 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
@@ -2222,6 +2550,12 @@ class LLAvatarFreeze : public view_listener_t | |||
2222 | std::string fullname = avatar->getFullname(); | 2550 | std::string fullname = avatar->getFullname(); |
2223 | LLSD payload; | 2551 | LLSD payload; |
2224 | payload["avatar_id"] = avatar->getID(); | 2552 | payload["avatar_id"] = avatar->getID(); |
2553 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) | ||
2554 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!fullname.empty()) ) | ||
2555 | { | ||
2556 | fullname = gRlvHandler.getAnonym(fullname); | ||
2557 | } | ||
2558 | // [/RLVa:KB] | ||
2225 | 2559 | ||
2226 | if (!fullname.empty()) | 2560 | if (!fullname.empty()) |
2227 | { | 2561 | { |
@@ -2248,7 +2582,11 @@ class LLAvatarVisibleDebug : public view_listener_t | |||
2248 | { | 2582 | { |
2249 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 2583 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
2250 | { | 2584 | { |
2251 | bool new_value = gAgent.isGodlike(); | 2585 | //bool new_value = gAgent.isGodlike(); |
2586 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
2587 | // TODO-RLVa: can you actually use this to cheat anything? | ||
2588 | bool new_value = gAgent.isGodlike() && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); | ||
2589 | // [/RLVa:KB] | ||
2252 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 2590 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
2253 | return true; | 2591 | return true; |
2254 | } | 2592 | } |
@@ -2347,6 +2685,12 @@ class LLAvatarEject : public view_listener_t | |||
2347 | LLSD payload; | 2685 | LLSD payload; |
2348 | payload["avatar_id"] = avatar->getID(); | 2686 | payload["avatar_id"] = avatar->getID(); |
2349 | std::string fullname = avatar->getFullname(); | 2687 | std::string fullname = avatar->getFullname(); |
2688 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) | ||
2689 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!fullname.empty()) ) | ||
2690 | { | ||
2691 | fullname = gRlvHandler.getAnonym(fullname); | ||
2692 | } | ||
2693 | // [/RLVa:KB] | ||
2350 | 2694 | ||
2351 | const LLVector3d& pos = avatar->getPositionGlobal(); | 2695 | const LLVector3d& pos = avatar->getPositionGlobal(); |
2352 | LLParcel* parcel = LLViewerParcelMgr::getInstance()->selectParcelAt(pos)->getParcel(); | 2696 | LLParcel* parcel = LLViewerParcelMgr::getInstance()->selectParcelAt(pos)->getParcel(); |
@@ -2430,6 +2774,13 @@ class LLAvatarGiveCard : public view_listener_t | |||
2430 | { | 2774 | { |
2431 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 2775 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
2432 | { | 2776 | { |
2777 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
2778 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
2779 | { | ||
2780 | return true; | ||
2781 | } | ||
2782 | // [/RLVa:KB] | ||
2783 | |||
2433 | llinfos << "handle_give_card()" << llendl; | 2784 | llinfos << "handle_give_card()" << llendl; |
2434 | LLViewerObject* dest = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); | 2785 | LLViewerObject* dest = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); |
2435 | if(dest && dest->isAvatar()) | 2786 | if(dest && dest->isAvatar()) |
@@ -2689,6 +3040,13 @@ class LLSelfStandUp : public view_listener_t | |||
2689 | { | 3040 | { |
2690 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 3041 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
2691 | { | 3042 | { |
3043 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
3044 | if (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) | ||
3045 | { | ||
3046 | return true; | ||
3047 | } | ||
3048 | // [/RLVa:KB] | ||
3049 | |||
2692 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | 3050 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); |
2693 | return true; | 3051 | return true; |
2694 | } | 3052 | } |
@@ -2698,7 +3056,10 @@ class LLSelfEnableStandUp : public view_listener_t | |||
2698 | { | 3056 | { |
2699 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 3057 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
2700 | { | 3058 | { |
2701 | bool new_value = gAgent.getAvatarObject() && gAgent.getAvatarObject()->mIsSitting; | 3059 | // bool new_value = gAgent.getAvatarObject() && gAgent.getAvatarObject()->mIsSitting; |
3060 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
3061 | bool new_value = gAgent.getAvatarObject() && gAgent.getAvatarObject()->mIsSitting && !gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT); | ||
3062 | // [/RLVa:KB] | ||
2702 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 3063 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
2703 | return true; | 3064 | return true; |
2704 | } | 3065 | } |
@@ -2873,6 +3234,11 @@ class LLAvatarEnableAddFriend : public view_listener_t | |||
2873 | { | 3234 | { |
2874 | LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); | 3235 | LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); |
2875 | bool new_value = avatar && !is_agent_friend(avatar->getID()); | 3236 | bool new_value = avatar && !is_agent_friend(avatar->getID()); |
3237 | |||
3238 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
3239 | new_value &= (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); | ||
3240 | // [/RLVa:KB] | ||
3241 | |||
2876 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 3242 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
2877 | return true; | 3243 | return true; |
2878 | } | 3244 | } |
@@ -2929,6 +3295,15 @@ bool handle_sit_or_stand() | |||
2929 | return true; | 3295 | return true; |
2930 | } | 3296 | } |
2931 | 3297 | ||
3298 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0c) | ||
3299 | if ( (rlv_handler_t::isEnabled()) && | ||
3300 | ( ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting)) || | ||
3301 | (gRlvHandler.hasBehaviour(RLV_BHVR_SIT)) ) ) | ||
3302 | { | ||
3303 | return true; | ||
3304 | } | ||
3305 | // [/RLVa:KB] | ||
3306 | |||
2932 | if (sitting_on_selection()) | 3307 | if (sitting_on_selection()) |
2933 | { | 3308 | { |
2934 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | 3309 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); |
@@ -2939,6 +3314,15 @@ bool handle_sit_or_stand() | |||
2939 | 3314 | ||
2940 | if (object && object->getPCode() == LL_PCODE_VOLUME) | 3315 | if (object && object->getPCode() == LL_PCODE_VOLUME) |
2941 | { | 3316 | { |
3317 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0g | ||
3318 | if ( (rlv_handler_t::isEnabled()) && | ||
3319 | ((gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) || (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH))) && | ||
3320 | (dist_vec_squared(gAgent.getPositionGlobal(), object->getPositionGlobal() + LLVector3d(pick.mObjectOffset)) > 1.5f * 1.5f) ) | ||
3321 | { | ||
3322 | return true; // Don't allow sitting farther away than 1.5m under @sittp=n or @fartouch=n | ||
3323 | } | ||
3324 | // [/RLVa:KB] | ||
3325 | |||
2942 | gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit); | 3326 | gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit); |
2943 | gMessageSystem->nextBlockFast(_PREHASH_AgentData); | 3327 | gMessageSystem->nextBlockFast(_PREHASH_AgentData); |
2944 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | 3328 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); |
@@ -2976,6 +3360,13 @@ class LLLandSit : public view_listener_t | |||
2976 | { | 3360 | { |
2977 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 3361 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
2978 | { | 3362 | { |
3363 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
3364 | if (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) | ||
3365 | { | ||
3366 | return true; | ||
3367 | } | ||
3368 | // [/RLVa:KB] | ||
3369 | |||
2979 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | 3370 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); |
2980 | LLViewerParcelMgr::getInstance()->deselectLand(); | 3371 | LLViewerParcelMgr::getInstance()->deselectLand(); |
2981 | 3372 | ||
@@ -3206,6 +3597,14 @@ class LLEditDuplicate : public view_listener_t | |||
3206 | { | 3597 | { |
3207 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 3598 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
3208 | { | 3599 | { |
3600 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
3601 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) && | ||
3602 | (LLEditMenuHandler::gEditMenuHandler == LLSelectMgr::getInstance()) ) | ||
3603 | { | ||
3604 | return true; | ||
3605 | } | ||
3606 | // [/RLVa:KB] | ||
3607 | |||
3209 | if(LLEditMenuHandler::gEditMenuHandler) | 3608 | if(LLEditMenuHandler::gEditMenuHandler) |
3210 | { | 3609 | { |
3211 | LLEditMenuHandler::gEditMenuHandler->duplicate(); | 3610 | LLEditMenuHandler::gEditMenuHandler->duplicate(); |
@@ -3219,6 +3618,13 @@ class LLEditEnableDuplicate : public view_listener_t | |||
3219 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 3618 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
3220 | { | 3619 | { |
3221 | bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDuplicate(); | 3620 | bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDuplicate(); |
3621 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
3622 | if ( (new_value) && (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) && | ||
3623 | (LLEditMenuHandler::gEditMenuHandler == LLSelectMgr::getInstance()) ) | ||
3624 | { | ||
3625 | new_value = false; | ||
3626 | } | ||
3627 | // [/RLVa:KB] | ||
3222 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 3628 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
3223 | return true; | 3629 | return true; |
3224 | } | 3630 | } |
@@ -3604,6 +4010,11 @@ class LLToolsTakeCopy : public view_listener_t | |||
3604 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4010 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
3605 | { | 4011 | { |
3606 | if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true; | 4012 | if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true; |
4013 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | Modified: RLVa-1.0.0b | ||
4014 | // NOTE: we need to handle "Take Copy" because it will force a sim-side unsit if we're sitting on the selection, | ||
4015 | // but we do want to allow "Take Copy" under @rez=n so that's why we explicitly check for @unsit=n here | ||
4016 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (!rlvCanDeleteOrReturn()) ) return true; | ||
4017 | // [/RLVa:KB] | ||
3607 | 4018 | ||
3608 | const LLUUID& category_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_OBJECT); | 4019 | const LLUUID& category_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_OBJECT); |
3609 | derez_objects(DRD_ACQUIRE_TO_AGENT_INVENTORY, category_id); | 4020 | derez_objects(DRD_ACQUIRE_TO_AGENT_INVENTORY, category_id); |
@@ -3619,6 +4030,9 @@ class LLObjectReturn : public view_listener_t | |||
3619 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4030 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
3620 | { | 4031 | { |
3621 | if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true; | 4032 | if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true; |
4033 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4034 | if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) ) return true; | ||
4035 | // [/RLVa:KB] | ||
3622 | 4036 | ||
3623 | mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); | 4037 | mObjectSelection = LLSelectMgr::getInstance()->getEditSelection(); |
3624 | 4038 | ||
@@ -3686,6 +4100,14 @@ class LLObjectEnableReturn : public view_listener_t | |||
3686 | } | 4100 | } |
3687 | } | 4101 | } |
3688 | #endif | 4102 | #endif |
4103 | |||
4104 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4105 | if ( (new_value) && (rlv_handler_t::isEnabled()) ) | ||
4106 | { | ||
4107 | new_value = rlvCanDeleteOrReturn(); | ||
4108 | } | ||
4109 | // [/RLVa:KB] | ||
4110 | |||
3689 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 4111 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
3690 | return true; | 4112 | return true; |
3691 | } | 4113 | } |
@@ -3707,6 +4129,13 @@ void handle_take() | |||
3707 | return; | 4129 | return; |
3708 | } | 4130 | } |
3709 | 4131 | ||
4132 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4133 | if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) ) | ||
4134 | { | ||
4135 | return; | ||
4136 | } | ||
4137 | // [/RLVa:KB] | ||
4138 | |||
3710 | BOOL you_own_everything = TRUE; | 4139 | BOOL you_own_everything = TRUE; |
3711 | BOOL locked_but_takeable_object = FALSE; | 4140 | BOOL locked_but_takeable_object = FALSE; |
3712 | LLUUID category_id; | 4141 | LLUUID category_id; |
@@ -3826,6 +4255,13 @@ BOOL enable_take() | |||
3826 | return FALSE; | 4255 | return FALSE; |
3827 | } | 4256 | } |
3828 | 4257 | ||
4258 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4259 | if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) ) | ||
4260 | { | ||
4261 | return FALSE; | ||
4262 | } | ||
4263 | // [/RLVa:KB] | ||
4264 | |||
3829 | for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin(); | 4265 | for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin(); |
3830 | iter != LLSelectMgr::getInstance()->getSelection()->valid_root_end(); iter++) | 4266 | iter != LLSelectMgr::getInstance()->getSelection()->valid_root_end(); iter++) |
3831 | { | 4267 | { |
@@ -4178,16 +4614,61 @@ class LLToolsEnableUnlink : public view_listener_t | |||
4178 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4614 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4179 | { | 4615 | { |
4180 | bool new_value = false; | 4616 | bool new_value = false; |
4181 | if (LLSelectMgr::getInstance()->selectGetAllRootsValid() && | 4617 | if (LLToolMgr::getInstance()->getCurrentTool() != LLToolFace::getInstance()) |
4182 | LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() && | ||
4183 | !LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject()->isAttachment()) | ||
4184 | { | 4618 | { |
4185 | if (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() != | 4619 | if (LLSelectMgr::getInstance()->selectGetAllRootsValid() && |
4186 | LLSelectMgr::getInstance()->getSelection()->getObjectCount()) | 4620 | LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() && |
4621 | !LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject()->isAttachment()) | ||
4187 | { | 4622 | { |
4188 | new_value = true; | 4623 | // LL's viewer unlinks the last linkset selected, |
4624 | // regardless of how many linksets or prims are selected total. | ||
4625 | // Preserve that behavior when enabling the unlink option. | ||
4626 | if (gSavedSettings.getBOOL("EditLinkedParts")) | ||
4627 | { | ||
4628 | struct f : public LLSelectedNodeFunctor | ||
4629 | { | ||
4630 | virtual bool apply(LLSelectNode* pNode) | ||
4631 | { | ||
4632 | // Return the first selection node that is | ||
4633 | // 1) not a root prim | ||
4634 | // 2) or a root prim that has child prims | ||
4635 | // or in other words: any prim that is part of a linkset | ||
4636 | return (pNode->getObject() != pNode->getObject()->getRootEdit()) || | ||
4637 | (pNode->getObject()->numChildren() != 0); | ||
4638 | } | ||
4639 | } func; | ||
4640 | |||
4641 | if (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(&func, TRUE)) | ||
4642 | { | ||
4643 | // the selection contains at least one prim (child or root) that is part of a linkset | ||
4644 | new_value = true; | ||
4645 | } | ||
4646 | } | ||
4647 | else | ||
4648 | { | ||
4649 | if (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() != | ||
4650 | LLSelectMgr::getInstance()->getSelection()->getObjectCount()) | ||
4651 | { | ||
4652 | new_value = true; | ||
4653 | } | ||
4654 | } | ||
4189 | } | 4655 | } |
4190 | } | 4656 | } |
4657 | |||
4658 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0g | ||
4659 | // The user might not be allowed to unlink this object due to RLV settings, | ||
4660 | // because it would unsit them if they are sitting on the object. | ||
4661 | if ( (new_value) && (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && | ||
4662 | (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting) ) | ||
4663 | { | ||
4664 | // Allow if the avie isn't sitting on any of the selected objects | ||
4665 | LLObjectSelectionHandle handleSel = LLSelectMgr::getInstance()->getSelection(); | ||
4666 | RlvSelectIsSittingOn func(gAgent.getAvatarObject()->getRoot()); | ||
4667 | if (handleSel->getFirstRootNode(&func, TRUE)) | ||
4668 | new_value = false; | ||
4669 | } | ||
4670 | // [/RLVa:KB] | ||
4671 | |||
4191 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 4672 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
4192 | return true; | 4673 | return true; |
4193 | } | 4674 | } |
@@ -4197,6 +4678,19 @@ class LLToolsUnlink : public view_listener_t | |||
4197 | { | 4678 | { |
4198 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4679 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4199 | { | 4680 | { |
4681 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0g | ||
4682 | // The user might not be allowed to unlink this object due to RLV settings, | ||
4683 | // because it would unsit them if they are sitting on the object. | ||
4684 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting) ) | ||
4685 | { | ||
4686 | // Allow if the avie isn't sitting on any of the selected objects | ||
4687 | LLObjectSelectionHandle handleSel = LLSelectMgr::getInstance()->getSelection(); | ||
4688 | RlvSelectIsSittingOn func(gAgent.getAvatarObject()->getRoot()); | ||
4689 | if (handleSel->getFirstRootNode(&func, TRUE)) | ||
4690 | return true; | ||
4691 | } | ||
4692 | // [/RLVa:KB] | ||
4693 | |||
4200 | LLSelectMgr::getInstance()->sendDelink(); | 4694 | LLSelectMgr::getInstance()->sendDelink(); |
4201 | return true; | 4695 | return true; |
4202 | } | 4696 | } |
@@ -4216,6 +4710,13 @@ class LLToolsReleaseKeys : public view_listener_t | |||
4216 | { | 4710 | { |
4217 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4711 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4218 | { | 4712 | { |
4713 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
4714 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | ||
4715 | { | ||
4716 | return true; | ||
4717 | } | ||
4718 | // [/RLVa:KB] | ||
4719 | |||
4219 | gAgent.forceReleaseControls(); | 4720 | gAgent.forceReleaseControls(); |
4220 | 4721 | ||
4221 | return true; | 4722 | return true; |
@@ -4226,7 +4727,11 @@ class LLToolsEnableReleaseKeys : public view_listener_t | |||
4226 | { | 4727 | { |
4227 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4728 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4228 | { | 4729 | { |
4229 | gMenuHolder->findControl(userdata["control"].asString())->setValue( gAgent.anyControlGrabbed() ); | 4730 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) |
4731 | gMenuHolder->findControl(userdata["control"].asString())->setValue( | ||
4732 | gAgent.anyControlGrabbed() && ( (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasLockedAttachment() ) ) ); | ||
4733 | // [/RLVa:KB] | ||
4734 | //gMenuHolder->findControl(userdata["control"].asString())->setValue( gAgent.anyControlGrabbed() ); | ||
4230 | return true; | 4735 | return true; |
4231 | } | 4736 | } |
4232 | }; | 4737 | }; |
@@ -4334,6 +4839,15 @@ class LLEditEnableDelete : public view_listener_t | |||
4334 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4839 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4335 | { | 4840 | { |
4336 | bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDoDelete(); | 4841 | bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDoDelete(); |
4842 | |||
4843 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4844 | // NOTE: we want to disable delete on objects but not disable delete on text | ||
4845 | if ( (new_value) && (rlv_handler_t::isEnabled()) && (LLEditMenuHandler::gEditMenuHandler == LLSelectMgr::getInstance()) ) | ||
4846 | { | ||
4847 | new_value = rlvCanDeleteOrReturn(); | ||
4848 | } | ||
4849 | // [/RLVa:KB] | ||
4850 | |||
4337 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 4851 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
4338 | return true; | 4852 | return true; |
4339 | } | 4853 | } |
@@ -4343,6 +4857,15 @@ class LLEditDelete : public view_listener_t | |||
4343 | { | 4857 | { |
4344 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4858 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4345 | { | 4859 | { |
4860 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4861 | // NOTE: we want to disable delete on objects but not disable delete on text | ||
4862 | if ( (rlv_handler_t::isEnabled()) && (LLEditMenuHandler::gEditMenuHandler == LLSelectMgr::getInstance()) && | ||
4863 | (!rlvCanDeleteOrReturn()) ) | ||
4864 | { | ||
4865 | return true; | ||
4866 | } | ||
4867 | // [/RLVa:KB] | ||
4868 | |||
4346 | // If a text field can do a deletion, it gets precedence over deleting | 4869 | // If a text field can do a deletion, it gets precedence over deleting |
4347 | // an object in the world. | 4870 | // an object in the world. |
4348 | if( LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDoDelete()) | 4871 | if( LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDoDelete()) |
@@ -4374,6 +4897,12 @@ class LLObjectEnableDelete : public view_listener_t | |||
4374 | # endif | 4897 | # endif |
4375 | LLSelectMgr::getInstance()->canDoDelete(); | 4898 | LLSelectMgr::getInstance()->canDoDelete(); |
4376 | #endif | 4899 | #endif |
4900 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4901 | if ( (new_value) && (rlv_handler_t::isEnabled()) ) | ||
4902 | { | ||
4903 | new_value = rlvCanDeleteOrReturn(); | ||
4904 | } | ||
4905 | // [/RLVa:KB] | ||
4377 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 4906 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
4378 | return true; | 4907 | return true; |
4379 | } | 4908 | } |
@@ -4392,6 +4921,13 @@ class LLObjectDelete : public view_listener_t | |||
4392 | { | 4921 | { |
4393 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4922 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4394 | { | 4923 | { |
4924 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
4925 | if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) ) | ||
4926 | { | ||
4927 | return true; | ||
4928 | } | ||
4929 | // [/RLVa:KB] | ||
4930 | |||
4395 | if (LLSelectMgr::getInstance()) | 4931 | if (LLSelectMgr::getInstance()) |
4396 | { | 4932 | { |
4397 | LLSelectMgr::getInstance()->doDelete(); | 4933 | LLSelectMgr::getInstance()->doDelete(); |
@@ -4751,6 +5287,12 @@ class LLWorldCreateLandmark : public view_listener_t | |||
4751 | { | 5287 | { |
4752 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 5288 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4753 | { | 5289 | { |
5290 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
5291 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
5292 | { | ||
5293 | return true; | ||
5294 | } | ||
5295 | // [/RLVa:KB] | ||
4754 | LLViewerRegion* agent_region = gAgent.getRegion(); | 5296 | LLViewerRegion* agent_region = gAgent.getRegion(); |
4755 | if(!agent_region) | 5297 | if(!agent_region) |
4756 | { | 5298 | { |
@@ -4858,6 +5400,13 @@ class LLAvatarInviteToGroup : public view_listener_t | |||
4858 | { | 5400 | { |
4859 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 5401 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4860 | { | 5402 | { |
5403 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
5404 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
5405 | { | ||
5406 | return true; | ||
5407 | } | ||
5408 | // [/RLVa:KB] | ||
5409 | |||
4861 | LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); | 5410 | LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); |
4862 | if(avatar) | 5411 | if(avatar) |
4863 | { | 5412 | { |
@@ -4871,6 +5420,13 @@ class LLAvatarAddFriend : public view_listener_t | |||
4871 | { | 5420 | { |
4872 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 5421 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4873 | { | 5422 | { |
5423 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
5424 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
5425 | { | ||
5426 | return true; // Fallback code [see LLAvatarEnableAddFriend::handleEvent()] | ||
5427 | } | ||
5428 | // [/RLVa:KB] | ||
5429 | |||
4874 | LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); | 5430 | LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); |
4875 | if(avatar && !is_agent_friend(avatar->getID())) | 5431 | if(avatar && !is_agent_friend(avatar->getID())) |
4876 | { | 5432 | { |
@@ -4959,6 +5515,12 @@ class LLEnablePayObject : public view_listener_t | |||
4959 | } | 5515 | } |
4960 | } | 5516 | } |
4961 | } | 5517 | } |
5518 | |||
5519 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
5520 | // Don't enable "Pay..." on the avatar pie menu under @shownames=n | ||
5521 | new_value &= (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (avatar == NULL); | ||
5522 | // [/RLVa:KB] | ||
5523 | |||
4962 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 5524 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
4963 | return true; | 5525 | return true; |
4964 | } | 5526 | } |
@@ -5147,6 +5709,12 @@ class LLShowFloater : public view_listener_t | |||
5147 | } | 5709 | } |
5148 | else if (floater_name == "buy land") | 5710 | else if (floater_name == "buy land") |
5149 | { | 5711 | { |
5712 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
5713 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) | ||
5714 | { | ||
5715 | return true; | ||
5716 | } | ||
5717 | // [/RLVa:KB] | ||
5150 | if (LLViewerParcelMgr::getInstance()->selectionEmpty()) | 5718 | if (LLViewerParcelMgr::getInstance()->selectionEmpty()) |
5151 | { | 5719 | { |
5152 | LLViewerParcelMgr::getInstance()->selectParcelAt(gAgent.getPositionGlobal()); | 5720 | LLViewerParcelMgr::getInstance()->selectParcelAt(gAgent.getPositionGlobal()); |
@@ -5209,6 +5777,10 @@ class LLShowFloater : public view_listener_t | |||
5209 | { | 5777 | { |
5210 | LLFloaterActiveSpeakers::toggleInstance(LLSD()); | 5778 | LLFloaterActiveSpeakers::toggleInstance(LLSD()); |
5211 | } | 5779 | } |
5780 | else if (floater_name == "animation list") | ||
5781 | { | ||
5782 | JCFloaterAnimList::toggleInstance(LLSD()); | ||
5783 | } | ||
5212 | else if (floater_name == "inworld browser") | 5784 | else if (floater_name == "inworld browser") |
5213 | { | 5785 | { |
5214 | LLFloaterMediaBrowser::toggle(); | 5786 | LLFloaterMediaBrowser::toggle(); |
@@ -5370,6 +5942,13 @@ class LLShowAgentProfile : public view_listener_t | |||
5370 | } | 5942 | } |
5371 | else if (userdata.asString() == "hit object") | 5943 | else if (userdata.asString() == "hit object") |
5372 | { | 5944 | { |
5945 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
5946 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
5947 | { | ||
5948 | return true; | ||
5949 | } | ||
5950 | // [/RLVa:KB] | ||
5951 | |||
5373 | LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); | 5952 | LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); |
5374 | if (objectp) | 5953 | if (objectp) |
5375 | { | 5954 | { |
@@ -5429,6 +6008,13 @@ class LLLandEdit : public view_listener_t | |||
5429 | { | 6008 | { |
5430 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 6009 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
5431 | { | 6010 | { |
6011 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) | ||
6012 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) ) | ||
6013 | { | ||
6014 | return true; | ||
6015 | } | ||
6016 | // [/RLVa:KB] | ||
6017 | |||
5432 | if (gAgent.getFocusOnAvatar() && gSavedSettings.getBOOL("EditCameraMovement") ) | 6018 | if (gAgent.getFocusOnAvatar() && gSavedSettings.getBOOL("EditCameraMovement") ) |
5433 | { | 6019 | { |
5434 | // zoom in if we're looking at the avatar | 6020 | // zoom in if we're looking at the avatar |
@@ -5513,6 +6099,18 @@ private: | |||
5513 | LLViewerJointAttachment* attachment_point = NULL; | 6099 | LLViewerJointAttachment* attachment_point = NULL; |
5514 | if (index > 0) | 6100 | if (index > 0) |
5515 | attachment_point = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL); | 6101 | attachment_point = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL); |
6102 | |||
6103 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
6104 | if ( (rlv_handler_t::isEnabled()) && | ||
6105 | ( ((index == 0) && (gRlvHandler.hasLockedAttachment())) || // Can't wear on default attach point | ||
6106 | ((index > 0) && (!gRlvHandler.isDetachable(attachment_point))) || // Can't replace locked attachment | ||
6107 | (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) ) // Attach on rezzed object == "Take" | ||
6108 | { | ||
6109 | setObjectSelection(NULL); // Clear the selection or it'll get stuck | ||
6110 | return true; | ||
6111 | } | ||
6112 | // [/RLVa:KB] | ||
6113 | |||
5516 | confirm_replace_attachment(0, attachment_point); | 6114 | confirm_replace_attachment(0, attachment_point); |
5517 | } | 6115 | } |
5518 | return true; | 6116 | return true; |
@@ -5620,6 +6218,24 @@ class LLAttachmentDrop : public view_listener_t | |||
5620 | return true; | 6218 | return true; |
5621 | } | 6219 | } |
5622 | 6220 | ||
6221 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
6222 | if (rlv_handler_t::isEnabled()) | ||
6223 | { | ||
6224 | if (gRlvHandler.hasLockedAttachment()) | ||
6225 | { | ||
6226 | // NOTE: copy/paste of the code in enable_detach() | ||
6227 | LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); | ||
6228 | RlvSelectHasLockedAttach functor; | ||
6229 | if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) ) | ||
6230 | return true; | ||
6231 | } | ||
6232 | else if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) | ||
6233 | { | ||
6234 | return true; | ||
6235 | } | ||
6236 | } | ||
6237 | // [/RLVa:KB] | ||
6238 | |||
5623 | // The sendDropAttachment() method works on the list of selected | 6239 | // The sendDropAttachment() method works on the list of selected |
5624 | // objects. Thus we need to clear the list, make sure it only | 6240 | // objects. Thus we need to clear the list, make sure it only |
5625 | // contains the object the user clicked, send the message, | 6241 | // contains the object the user clicked, send the message, |
@@ -5638,6 +6254,13 @@ void handle_detach_from_avatar(void* user_data) | |||
5638 | 6254 | ||
5639 | if (attached_object) | 6255 | if (attached_object) |
5640 | { | 6256 | { |
6257 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0d | ||
6258 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(attached_object)) ) | ||
6259 | { | ||
6260 | return; | ||
6261 | } | ||
6262 | // [/RLVa:KB] | ||
6263 | |||
5641 | gMessageSystem->newMessage("ObjectDetach"); | 6264 | gMessageSystem->newMessage("ObjectDetach"); |
5642 | gMessageSystem->nextBlockFast(_PREHASH_AgentData); | 6265 | gMessageSystem->nextBlockFast(_PREHASH_AgentData); |
5643 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); | 6266 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); |
@@ -5720,6 +6343,17 @@ class LLAttachmentDetach : public view_listener_t | |||
5720 | return true; | 6343 | return true; |
5721 | } | 6344 | } |
5722 | 6345 | ||
6346 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
6347 | // NOTE: copy/paste of the code in enable_detach() | ||
6348 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | ||
6349 | { | ||
6350 | LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); | ||
6351 | RlvSelectHasLockedAttach functor; | ||
6352 | if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) ) | ||
6353 | return FALSE; | ||
6354 | } | ||
6355 | // [/RLVa:KB] | ||
6356 | |||
5723 | // The sendDetach() method works on the list of selected | 6357 | // The sendDetach() method works on the list of selected |
5724 | // objects. Thus we need to clear the list, make sure it only | 6358 | // objects. Thus we need to clear the list, make sure it only |
5725 | // contains the object the user clicked, send the message, | 6359 | // contains the object the user clicked, send the message, |
@@ -5757,6 +6391,8 @@ class LLAttachmentEnableDrop : public view_listener_t | |||
5757 | { | 6391 | { |
5758 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 6392 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
5759 | { | 6393 | { |
6394 | if (gDisconnected) | ||
6395 | return true; | ||
5760 | BOOL can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->agentCanBuild()); | 6396 | BOOL can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->agentCanBuild()); |
5761 | 6397 | ||
5762 | //Add an inventory observer to only allow dropping the newly attached item | 6398 | //Add an inventory observer to only allow dropping the newly attached item |
@@ -5802,8 +6438,10 @@ class LLAttachmentEnableDrop : public view_listener_t | |||
5802 | } | 6438 | } |
5803 | 6439 | ||
5804 | //now check to make sure that the item is actually in the inventory before we enable dropping it | 6440 | //now check to make sure that the item is actually in the inventory before we enable dropping it |
5805 | bool new_value = enable_detach(NULL) && can_build && item; | 6441 | // bool new_value = enable_detach(NULL) && can_build && item; |
5806 | 6442 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | |
6443 | bool new_value = enable_detach(NULL) && can_build && item && (!gRlvHandler.hasBehaviour(RLV_BHVR_REZ)); | ||
6444 | // [/RLVa:KB] | ||
5807 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 6445 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
5808 | return true; | 6446 | return true; |
5809 | } | 6447 | } |
@@ -5822,6 +6460,20 @@ BOOL enable_detach(void*) | |||
5822 | // ...if it's you, good to detach | 6460 | // ...if it's you, good to detach |
5823 | if (avatar->getID() == gAgent.getID()) | 6461 | if (avatar->getID() == gAgent.getID()) |
5824 | { | 6462 | { |
6463 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
6464 | // NOTE: this code is reused as-is in LLAttachmentDetach::handleEvent() and LLAttachmentDrop::handleEvent() | ||
6465 | // so any changes here should be reflected there as well (I think it's in a number of other places as well by now) | ||
6466 | |||
6467 | // RELEASE-RLVa: LLSelectMgr::sendDetach() and LLSelectMgr::sendDropAttachment() call sendListToRegions with | ||
6468 | // SEND_ONLY_ROOTS so we only need to examine the roots which saves us time | ||
6469 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | ||
6470 | { | ||
6471 | LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); | ||
6472 | RlvSelectHasLockedAttach functor; | ||
6473 | if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) ) | ||
6474 | return FALSE; | ||
6475 | } | ||
6476 | // [/RLVa:KB] | ||
5825 | return TRUE; | 6477 | return TRUE; |
5826 | } | 6478 | } |
5827 | 6479 | ||
@@ -5844,6 +6496,25 @@ class LLAttachmentEnableDetach : public view_listener_t | |||
5844 | // Used to tell if the selected object can be attached to your avatar. | 6496 | // Used to tell if the selected object can be attached to your avatar. |
5845 | BOOL object_selected_and_point_valid(void *user_data) | 6497 | BOOL object_selected_and_point_valid(void *user_data) |
5846 | { | 6498 | { |
6499 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | ||
6500 | if (rlv_handler_t::isEnabled()) | ||
6501 | { | ||
6502 | // RELEASE-RLVa: look at the caller graph for this function on every new release | ||
6503 | // -> 1.22.11 and 1.23.4 | ||
6504 | // - object_is_wearable() => dead code [user_data == NULL => default attach point => OK!] | ||
6505 | // - LLObjectEnableWear::handleEvent() => Rezzed prim / right-click / "Wear" [user_data == NULL => see above] | ||
6506 | // - enabler set up in LLVOAvatar::buildCharacter() => Rezzed prim / right-click / "Attach >" [user_data == pAttachPt] | ||
6507 | // - enabler set up in LLVOAvatar::buildCharacter() => Rezzed prim / Edit menu / "Attach Object" [user_data == pAttachPt] | ||
6508 | LLViewerJointAttachment* pAttachPt = (LLViewerJointAttachment*)user_data; | ||
6509 | if ( ((!pAttachPt) && (gRlvHandler.hasLockedAttachment())) || // Don't allow attach to default attach point | ||
6510 | ((pAttachPt) && (!gRlvHandler.isDetachable(pAttachPt))) || // Don't allow replacing of locked attachment | ||
6511 | (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) // Attaching a rezzed object == "Take" | ||
6512 | { | ||
6513 | return FALSE; | ||
6514 | } | ||
6515 | } | ||
6516 | // [/RLVa:KB] | ||
6517 | |||
5847 | //LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data; | 6518 | //LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data; |
5848 | LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); | 6519 | LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); |
5849 | for (LLObjectSelection::root_iterator iter = selection->root_begin(); | 6520 | for (LLObjectSelection::root_iterator iter = selection->root_begin(); |
@@ -5911,7 +6582,13 @@ BOOL object_attached(void *user_data) | |||
5911 | { | 6582 | { |
5912 | LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data; | 6583 | LLViewerJointAttachment *attachment = (LLViewerJointAttachment *)user_data; |
5913 | 6584 | ||
5914 | return attachment->getObject() != NULL; | 6585 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) |
6586 | return ( | ||
6587 | (attachment->getObject() != NULL) && | ||
6588 | ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.isDetachable(attachment->getObject())) ) | ||
6589 | ); | ||
6590 | // [/RLVa:KB] | ||
6591 | // return attachment->getObject() != NULL; | ||
5915 | } | 6592 | } |
5916 | 6593 | ||
5917 | class LLAvatarSendIM : public view_listener_t | 6594 | class LLAvatarSendIM : public view_listener_t |
@@ -5919,6 +6596,12 @@ class LLAvatarSendIM : public view_listener_t | |||
5919 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 6596 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
5920 | { | 6597 | { |
5921 | LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); | 6598 | LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); |
6599 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
6600 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
6601 | { | ||
6602 | return true; | ||
6603 | } | ||
6604 | // [/RLVa:KB] | ||
5922 | if(avatar) | 6605 | if(avatar) |
5923 | { | 6606 | { |
5924 | std::string name("IM"); | 6607 | std::string name("IM"); |
@@ -6054,6 +6737,16 @@ class LLToolsSelectedScriptAction : public view_listener_t | |||
6054 | { | 6737 | { |
6055 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 6738 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
6056 | { | 6739 | { |
6740 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
6741 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | ||
6742 | { | ||
6743 | LLObjectSelectionHandle selectHandle = LLSelectMgr::getInstance()->getSelection(); | ||
6744 | RlvSelectHasLockedAttach functor; | ||
6745 | if ( (selectHandle->isAttachment()) && (selectHandle->getFirstNode(&functor)) ) | ||
6746 | return true; | ||
6747 | } | ||
6748 | // [/RLVa:KB] | ||
6749 | |||
6057 | std::string action = userdata.asString(); | 6750 | std::string action = userdata.asString(); |
6058 | if (action == "compile mono") | 6751 | if (action == "compile mono") |
6059 | { | 6752 | { |
@@ -6114,7 +6807,10 @@ void handle_selected_texture_info(void*) | |||
6114 | S32 height = img->getHeight(); | 6807 | S32 height = img->getHeight(); |
6115 | S32 width = img->getWidth(); | 6808 | S32 width = img->getWidth(); |
6116 | S32 components = img->getComponents(); | 6809 | S32 components = img->getComponents(); |
6117 | msg = llformat("%dx%d %s on face ", | 6810 | std::string image_id_string = image_id.asString(); |
6811 | image_id_string = image_id_string.replace(24, 35, 12, '*') + " "; // hide last segment to discourage theft | ||
6812 | msg = llformat("%s%dx%d %s on face ", | ||
6813 | image_id_string.c_str(), | ||
6118 | width, | 6814 | width, |
6119 | height, | 6815 | height, |
6120 | (components == 4 ? "alpha" : "opaque")); | 6816 | (components == 4 ? "alpha" : "opaque")); |
@@ -6135,12 +6831,30 @@ void handle_dump_image_list(void*) | |||
6135 | 6831 | ||
6136 | void handle_test_male(void*) | 6832 | void handle_test_male(void*) |
6137 | { | 6833 | { |
6834 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
6835 | if ( (rlv_handler_t::isEnabled()) && | ||
6836 | ( (gRlvHandler.hasLockedAttachment()) || | ||
6837 | (gRlvHandler.hasBehaviour(RLV_BHVR_ADDOUTFIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_REMOUTFIT)) ) ) | ||
6838 | { | ||
6839 | return; | ||
6840 | } | ||
6841 | // [/RLVa:KB] | ||
6842 | |||
6138 | wear_outfit_by_name("Male Shape & Outfit"); | 6843 | wear_outfit_by_name("Male Shape & Outfit"); |
6139 | //gGestureList.requestResetFromServer( TRUE ); | 6844 | //gGestureList.requestResetFromServer( TRUE ); |
6140 | } | 6845 | } |
6141 | 6846 | ||
6142 | void handle_test_female(void*) | 6847 | void handle_test_female(void*) |
6143 | { | 6848 | { |
6849 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
6850 | if ( (rlv_handler_t::isEnabled()) && | ||
6851 | ( (gRlvHandler.hasLockedAttachment()) || | ||
6852 | (gRlvHandler.hasBehaviour(RLV_BHVR_ADDOUTFIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_REMOUTFIT)) ) ) | ||
6853 | { | ||
6854 | return; | ||
6855 | } | ||
6856 | // [/RLVa:KB] | ||
6857 | |||
6144 | wear_outfit_by_name("Female Shape & Outfit"); | 6858 | wear_outfit_by_name("Female Shape & Outfit"); |
6145 | //gGestureList.requestResetFromServer( FALSE ); | 6859 | //gGestureList.requestResetFromServer( FALSE ); |
6146 | } | 6860 | } |
@@ -6276,6 +6990,22 @@ BOOL enable_more_than_one_selected(void* ) | |||
6276 | 6990 | ||
6277 | static bool is_editable_selected() | 6991 | static bool is_editable_selected() |
6278 | { | 6992 | { |
6993 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-1.0.0c | ||
6994 | // RELEASE-RLVa: check that this still isn't called by anything but script actions in the Tools menu | ||
6995 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | ||
6996 | { | ||
6997 | LLObjectSelectionHandle selectHandle = LLSelectMgr::getInstance()->getSelection(); | ||
6998 | |||
6999 | // NOTE: this is called for 5 different menu items so we'll trade accuracy for efficiency and only | ||
7000 | // examine root nodes (LLToolsSelectedScriptAction::handleEvent() will catch what we miss) | ||
7001 | RlvSelectHasLockedAttach functor; | ||
7002 | if ( (selectHandle->isAttachment()) && (selectHandle->getFirstRootNode(&functor)) ) | ||
7003 | { | ||
7004 | return false; | ||
7005 | } | ||
7006 | } | ||
7007 | // [/RLVa:KB] | ||
7008 | |||
6279 | return (LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() != NULL); | 7009 | return (LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() != NULL); |
6280 | } | 7010 | } |
6281 | 7011 | ||
@@ -6322,7 +7052,12 @@ class LLToolsEnableTakeCopy : public view_listener_t | |||
6322 | { | 7052 | { |
6323 | virtual bool apply(LLViewerObject* obj) | 7053 | virtual bool apply(LLViewerObject* obj) |
6324 | { | 7054 | { |
6325 | return (!obj->permCopy() || obj->isAttachment()); | 7055 | // return (!obj->permCopy() || obj->isAttachment()); |
7056 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
7057 | return (!obj->permCopy() || obj->isAttachment()) || | ||
7058 | ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && | ||
7059 | (gAgent.getAvatarObject()->getRoot() == obj) ); | ||
7060 | // [/RLVa:KB] | ||
6326 | } | 7061 | } |
6327 | } func; | 7062 | } func; |
6328 | const bool firstonly = true; | 7063 | const bool firstonly = true; |
@@ -6515,6 +7250,9 @@ class LLWorldEnableCreateLandmark : public view_listener_t | |||
6515 | { | 7250 | { |
6516 | bool new_value = gAgent.isGodlike() || | 7251 | bool new_value = gAgent.isGodlike() || |
6517 | (gAgent.getRegion() && gAgent.getRegion()->getAllowLandmark()); | 7252 | (gAgent.getRegion() && gAgent.getRegion()->getAllowLandmark()); |
7253 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) | ||
7254 | new_value &= !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC); | ||
7255 | // [/RLVa:KB] | ||
6518 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 7256 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); |
6519 | return true; | 7257 | return true; |
6520 | } | 7258 | } |
@@ -6567,7 +7305,11 @@ BOOL enable_god_customer_service(void*) | |||
6567 | 7305 | ||
6568 | BOOL enable_god_basic(void*) | 7306 | BOOL enable_god_basic(void*) |
6569 | { | 7307 | { |
6570 | return gAgent.getGodLevel() > GOD_NOT; | 7308 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) |
7309 | // RELEASE-RLVa: check that this function isn't used for anything other than to enable/disable showing the "God Tools..." floater | ||
7310 | return (gAgent.getGodLevel() > GOD_NOT) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)); | ||
7311 | // [/RLVa:KB] | ||
7312 | //return gAgent.getGodLevel() > GOD_NOT; | ||
6571 | } | 7313 | } |
6572 | 7314 | ||
6573 | #if 0 // 1.9.2 | 7315 | #if 0 // 1.9.2 |
@@ -7123,6 +7865,13 @@ class LLViewHighlightTransparent : public view_listener_t | |||
7123 | { | 7865 | { |
7124 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 7866 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
7125 | { | 7867 | { |
7868 | // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) | ||
7869 | if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) | ||
7870 | { | ||
7871 | return true; | ||
7872 | } | ||
7873 | // [/RLVa:KB] | ||
7874 | |||
7126 | LLDrawPoolAlpha::sShowDebugAlpha = !LLDrawPoolAlpha::sShowDebugAlpha; | 7875 | LLDrawPoolAlpha::sShowDebugAlpha = !LLDrawPoolAlpha::sShowDebugAlpha; |
7127 | return true; | 7876 | return true; |
7128 | } | 7877 | } |
@@ -7170,6 +7919,13 @@ class LLViewShowHUDAttachments : public view_listener_t | |||
7170 | { | 7919 | { |
7171 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 7920 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
7172 | { | 7921 | { |
7922 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
7923 | if ( (LLPipeline::sShowHUDAttachments) && (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedHUD()) ) | ||
7924 | { | ||
7925 | return true; | ||
7926 | } | ||
7927 | // [/RLVa:KB] | ||
7928 | |||
7173 | LLPipeline::sShowHUDAttachments = !LLPipeline::sShowHUDAttachments; | 7929 | LLPipeline::sShowHUDAttachments = !LLPipeline::sShowHUDAttachments; |
7174 | return true; | 7930 | return true; |
7175 | } | 7931 | } |
@@ -7228,6 +7984,15 @@ class LLEditEnableTakeOff : public view_listener_t | |||
7228 | { | 7984 | { |
7229 | new_value = LLAgent::selfHasWearable((void *)WT_SKIRT); | 7985 | new_value = LLAgent::selfHasWearable((void *)WT_SKIRT); |
7230 | } | 7986 | } |
7987 | |||
7988 | // [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.0.0d) | ||
7989 | // Why aren't they using LLWearable::typeNameToType()? *confuzzled* | ||
7990 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isRemovable(LLWearable::typeNameToType(clothing))) ) | ||
7991 | { | ||
7992 | new_value = false; | ||
7993 | } | ||
7994 | // [/RLVa:KB] | ||
7995 | |||
7231 | gMenuHolder->findControl(control_name)->setValue(new_value); | 7996 | gMenuHolder->findControl(control_name)->setValue(new_value); |
7232 | return true; | 7997 | return true; |
7233 | } | 7998 | } |
@@ -7325,6 +8090,13 @@ class LLWorldEnvSettings : public view_listener_t | |||
7325 | { | 8090 | { |
7326 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 8091 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
7327 | { | 8092 | { |
8093 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
8094 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) | ||
8095 | { | ||
8096 | return true; | ||
8097 | } | ||
8098 | // [/RLVa:KB] | ||
8099 | |||
7328 | std::string tod = userdata.asString(); | 8100 | std::string tod = userdata.asString(); |
7329 | LLVector3 sun_direction; | 8101 | LLVector3 sun_direction; |
7330 | 8102 | ||
@@ -7402,6 +8174,13 @@ class LLWorldWaterSettings : public view_listener_t | |||
7402 | { | 8174 | { |
7403 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 8175 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
7404 | { | 8176 | { |
8177 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
8178 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) | ||
8179 | { | ||
8180 | return true; | ||
8181 | } | ||
8182 | // [/RLVa:KB] | ||
8183 | |||
7405 | // if not there or is hidden, show it | 8184 | // if not there or is hidden, show it |
7406 | if( !LLFloaterWater::isOpen() || | 8185 | if( !LLFloaterWater::isOpen() || |
7407 | !LLFloaterWater::instance()->getVisible()) { | 8186 | !LLFloaterWater::instance()->getVisible()) { |
@@ -7432,6 +8211,13 @@ class LLWorldDayCycle : public view_listener_t | |||
7432 | { | 8211 | { |
7433 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 8212 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
7434 | { | 8213 | { |
8214 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
8215 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) | ||
8216 | { | ||
8217 | return true; | ||
8218 | } | ||
8219 | // [/RLVa:KB] | ||
8220 | |||
7435 | LLFloaterDayCycle::show(); | 8221 | LLFloaterDayCycle::show(); |
7436 | return true; | 8222 | return true; |
7437 | } | 8223 | } |
@@ -7619,6 +8405,113 @@ class LLAdvancedCheckHUDInfo : public view_listener_t | |||
7619 | }; | 8405 | }; |
7620 | 8406 | ||
7621 | 8407 | ||
8408 | ////////////////////// | ||
8409 | // FORCE GROUND SIT // | ||
8410 | ////////////////////// | ||
8411 | |||
8412 | class LLAdvancedToggleSit: public view_listener_t | ||
8413 | { | ||
8414 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8415 | { | ||
8416 | LLChat chat; | ||
8417 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
8418 | if(!gAgent.getAvatarObject()->mIsSitting) | ||
8419 | { | ||
8420 | gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); | ||
8421 | chat.mText = "Forcing Ground Sit"; | ||
8422 | } | ||
8423 | else | ||
8424 | { | ||
8425 | gAgent.setControlFlags(!AGENT_CONTROL_SIT_ON_GROUND); | ||
8426 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | ||
8427 | chat.mText = "Standing up"; | ||
8428 | } | ||
8429 | LLFloaterChat::addChat(chat); | ||
8430 | return true; | ||
8431 | } | ||
8432 | }; | ||
8433 | |||
8434 | class LLAdvancedCheckSit : public view_listener_t | ||
8435 | { | ||
8436 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8437 | { | ||
8438 | if(gAgent.getAvatarObject()->mIsSitting) | ||
8439 | { | ||
8440 | gMenuHolder->findControl(userdata["control"].asString())->setValue(true); | ||
8441 | } | ||
8442 | else | ||
8443 | { | ||
8444 | gMenuHolder->findControl(userdata["control"].asString())->setValue(false); | ||
8445 | } | ||
8446 | return true; | ||
8447 | } | ||
8448 | }; | ||
8449 | |||
8450 | |||
8451 | ///////////// | ||
8452 | // PHANTOM // | ||
8453 | ///////////// | ||
8454 | |||
8455 | class LLAdvancedTogglePhantom: public view_listener_t | ||
8456 | { | ||
8457 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8458 | { | ||
8459 | LLAgent::togglePhantom(); | ||
8460 | BOOL ph = LLAgent::getPhantom(); | ||
8461 | LLChat chat; | ||
8462 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
8463 | chat.mText = llformat("%s%s","Phantom ",(ph ? "On" : "Off")); | ||
8464 | LLFloaterChat::addChat(chat); | ||
8465 | //gMenuHolder->findControl(userdata["control"].asString())->setValue(ph); | ||
8466 | return true; | ||
8467 | } | ||
8468 | |||
8469 | }; | ||
8470 | |||
8471 | class LLAdvancedCheckPhantom: public view_listener_t | ||
8472 | { | ||
8473 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8474 | { | ||
8475 | gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAgent::getPhantom()); | ||
8476 | return true; | ||
8477 | } | ||
8478 | }; | ||
8479 | |||
8480 | |||
8481 | /////////////////// | ||
8482 | // ASSET BROWSER // | ||
8483 | /////////////////// | ||
8484 | |||
8485 | class LLAdvancedToggleAssetBrowser: public view_listener_t | ||
8486 | { | ||
8487 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8488 | { | ||
8489 | //open the floater | ||
8490 | LLFloaterAssetBrowser::show(0); | ||
8491 | |||
8492 | bool vis = false; | ||
8493 | if(LLFloaterAssetBrowser::getInstance()) | ||
8494 | { | ||
8495 | vis = (bool)LLFloaterAssetBrowser::getInstance()->getVisible(); | ||
8496 | } | ||
8497 | return true; | ||
8498 | } | ||
8499 | }; | ||
8500 | |||
8501 | class LLAdvancedCheckAssetBrowser: public view_listener_t | ||
8502 | { | ||
8503 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
8504 | { | ||
8505 | bool vis = false; | ||
8506 | if(LLFloaterAssetBrowser::getInstance()) | ||
8507 | { | ||
8508 | vis = (bool)LLFloaterAssetBrowser::getInstance()->getVisible(); | ||
8509 | } | ||
8510 | gMenuHolder->findControl(userdata["control"].asString())->setValue(vis); | ||
8511 | return true; | ||
8512 | } | ||
8513 | }; | ||
8514 | |||
7622 | 8515 | ||
7623 | /////////////////////// | 8516 | /////////////////////// |
7624 | // CLEAR GROUP CACHE // | 8517 | // CLEAR GROUP CACHE // |
@@ -9559,6 +10452,49 @@ class LLAvatarReportAbuse : public view_listener_t | |||
9559 | 10452 | ||
9560 | 10453 | ||
9561 | 10454 | ||
10455 | /////////////// | ||
10456 | // RLVa Main // | ||
10457 | /////////////// | ||
10458 | |||
10459 | |||
10460 | class RLVaMainToggle : public view_listener_t | ||
10461 | { | ||
10462 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
10463 | { | ||
10464 | rlvToggleEnabled(NULL); | ||
10465 | return true; | ||
10466 | } | ||
10467 | }; | ||
10468 | |||
10469 | class RLVaMainCheck : public view_listener_t | ||
10470 | { | ||
10471 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
10472 | { | ||
10473 | bool new_value = rlvGetEnabled(NULL); | ||
10474 | std::string control_name = userdata["control"].asString(); | ||
10475 | gMenuHolder->findControl(control_name)->setValue(new_value); | ||
10476 | return true; | ||
10477 | } | ||
10478 | }; | ||
10479 | |||
10480 | |||
10481 | |||
10482 | //////////////////// | ||
10483 | // RLVa BEHAVIORS // | ||
10484 | //////////////////// | ||
10485 | |||
10486 | |||
10487 | class RLVaBehaviorsShow : public view_listener_t | ||
10488 | { | ||
10489 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
10490 | { | ||
10491 | RlvFloaterBehaviour::show(NULL); | ||
10492 | return true; | ||
10493 | } | ||
10494 | }; | ||
10495 | |||
10496 | |||
10497 | |||
9562 | static void addMenu(view_listener_t *menu, const char *name) | 10498 | static void addMenu(view_listener_t *menu, const char *name) |
9563 | { | 10499 | { |
9564 | sMenus.push_back(menu); | 10500 | sMenus.push_back(menu); |
@@ -9629,7 +10565,7 @@ void initialize_menus() | |||
9629 | addMenu(new LLZoomer(1/1.2f), "View.ZoomIn"); | 10565 | addMenu(new LLZoomer(1/1.2f), "View.ZoomIn"); |
9630 | addMenu(new LLZoomer(DEFAULT_FIELD_OF_VIEW, false), "View.ZoomDefault"); | 10566 | addMenu(new LLZoomer(DEFAULT_FIELD_OF_VIEW, false), "View.ZoomDefault"); |
9631 | addMenu(new LLViewFullscreen(), "View.Fullscreen"); | 10567 | addMenu(new LLViewFullscreen(), "View.Fullscreen"); |
9632 | addMenu(new LLViewDefaultUISize(), "View.DefaultUISize"); | 10568 | addMenu(new LLViewDefaultUISize(), "View.DefaultUISize"); //unused - now in preferences > general -- McCabe |
9633 | 10569 | ||
9634 | addMenu(new LLViewEnableMouselook(), "View.EnableMouselook"); | 10570 | addMenu(new LLViewEnableMouselook(), "View.EnableMouselook"); |
9635 | addMenu(new LLViewEnableJoystickFlycam(), "View.EnableJoystickFlycam"); | 10571 | addMenu(new LLViewEnableJoystickFlycam(), "View.EnableJoystickFlycam"); |
@@ -9740,6 +10676,10 @@ void initialize_menus() | |||
9740 | addMenu(new LLObjectBuy(), "Object.Buy"); | 10676 | addMenu(new LLObjectBuy(), "Object.Buy"); |
9741 | addMenu(new LLObjectEdit(), "Object.Edit"); | 10677 | addMenu(new LLObjectEdit(), "Object.Edit"); |
9742 | addMenu(new LLObjectInspect(), "Object.Inspect"); | 10678 | addMenu(new LLObjectInspect(), "Object.Inspect"); |
10679 | addMenu(new LLObjectCopyUUID(), "Object.CopyUUID"); | ||
10680 | addMenu(new LLObjectExport(), "Object.Export"); | ||
10681 | addMenu(new LLObjectImport(), "Object.Import"); | ||
10682 | addMenu(new LLObjectImportUpload(), "Object.ImportUpload"); | ||
9743 | 10683 | ||
9744 | addMenu(new LLObjectEnableOpen(), "Object.EnableOpen"); | 10684 | addMenu(new LLObjectEnableOpen(), "Object.EnableOpen"); |
9745 | addMenu(new LLObjectEnableTouch(), "Object.EnableTouch"); | 10685 | addMenu(new LLObjectEnableTouch(), "Object.EnableTouch"); |
@@ -9750,6 +10690,9 @@ void initialize_menus() | |||
9750 | addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse"); | 10690 | addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse"); |
9751 | addMenu(new LLObjectEnableMute(), "Object.EnableMute"); | 10691 | addMenu(new LLObjectEnableMute(), "Object.EnableMute"); |
9752 | addMenu(new LLObjectEnableBuy(), "Object.EnableBuy"); | 10692 | addMenu(new LLObjectEnableBuy(), "Object.EnableBuy"); |
10693 | addMenu(new LLObjectEnableCopyUUID(), "Object.EnableCopyUUID"); | ||
10694 | addMenu(new LLObjectEnableExport(), "Object.EnableExport"); | ||
10695 | addMenu(new LLObjectEnableImport(), "Object.EnableImport"); | ||
9753 | 10696 | ||
9754 | /*addMenu(new LLObjectVisibleTouch(), "Object.VisibleTouch"); | 10697 | /*addMenu(new LLObjectVisibleTouch(), "Object.VisibleTouch"); |
9755 | addMenu(new LLObjectVisibleCustomTouch(), "Object.VisibleCustomTouch"); | 10698 | addMenu(new LLObjectVisibleCustomTouch(), "Object.VisibleCustomTouch"); |
@@ -9799,6 +10742,12 @@ void initialize_menus() | |||
9799 | addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole"); | 10742 | addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole"); |
9800 | addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole"); | 10743 | addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole"); |
9801 | addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides"); | 10744 | addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides"); |
10745 | addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit"); | ||
10746 | addMenu(new LLAdvancedCheckSit(), "Advanced.CheckSit"); | ||
10747 | addMenu(new LLAdvancedTogglePhantom(), "Advanced.TogglePhantom"); | ||
10748 | addMenu(new LLAdvancedCheckPhantom(), "Advanced.CheckPhantom"); | ||
10749 | addMenu(new LLAdvancedToggleAssetBrowser(),"Advanced.ToggleAssetBrowser"); | ||
10750 | addMenu(new LLAdvancedCheckAssetBrowser(),"Advanced.CheckAssetBrowser"); | ||
9802 | 10751 | ||
9803 | // Advanced > HUD Info | 10752 | // Advanced > HUD Info |
9804 | addMenu(new LLAdvancedToggleHUDInfo(), "Advanced.ToggleHUDInfo"); | 10753 | addMenu(new LLAdvancedToggleHUDInfo(), "Advanced.ToggleHUDInfo"); |
@@ -9944,4 +10893,11 @@ void initialize_menus() | |||
9944 | addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions"); | 10893 | addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions"); |
9945 | addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus"); | 10894 | addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus"); |
9946 | addMenu(new LLAdvancedLeaveAdminStatus(), "Advanced.LeaveAdminStatus"); | 10895 | addMenu(new LLAdvancedLeaveAdminStatus(), "Advanced.LeaveAdminStatus"); |
10896 | |||
10897 | |||
10898 | // RLVa | ||
10899 | addMenu(new RLVaMainToggle(), "RLVa.Main.Toggle"); | ||
10900 | addMenu(new RLVaMainCheck(), "RLVa.Main.Enabled"); | ||
10901 | addMenu(new RLVaBehaviorsShow(), "RLVa.Behaviors.Show"); | ||
10902 | |||
9947 | } | 10903 | } |