aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorAleric Inglewood2010-10-22 03:04:49 +0200
committerAleric Inglewood2010-10-22 03:04:49 +0200
commit4e659351474096d1a7b835a69af13cbdf84257f3 (patch)
tree912cc63d3e53fef3360fbcb908d254e5253dd88e /linden/indra/newview/llviewermenu.cpp
parentLindenUserDir fixes, part 2. (diff)
parentMerge branch 'weekly' of http://github.com/imprudence/imprudence into weekly (diff)
downloadmeta-impy-4e659351474096d1a7b835a69af13cbdf84257f3.zip
meta-impy-4e659351474096d1a7b835a69af13cbdf84257f3.tar.gz
meta-impy-4e659351474096d1a7b835a69af13cbdf84257f3.tar.bz2
meta-impy-4e659351474096d1a7b835a69af13cbdf84257f3.tar.xz
Merge branch 'weekly' into webkit_plugins
Conflicts: linden/indra/cmake/GStreamer.cmake linden/indra/cmake/GStreamer.cmake was deleted: we're going to try to use system libs, so any improvements that have been made in weekly have been invane. linden/indra/newview/llstartup.cpp Trivial #include collision. One include added another removed. Fixed. linden/indra/newview/lltoolpie.cpp Collision with RLV, pretty trivial. Fixed. linden/indra/newview/viewer_manifest.py Trivial White space fix collision with commenting out of gstreamer libs. Fixed.
Diffstat (limited to 'linden/indra/newview/llviewermenu.cpp')
-rw-r--r--linden/indra/newview/llviewermenu.cpp102
1 files changed, 59 insertions, 43 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index a405764..308a19d 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -241,10 +241,8 @@ void init_debug_ui_menu(LLMenuGL* menu);
241void init_debug_xui_menu(LLMenuGL* menu); 241void init_debug_xui_menu(LLMenuGL* menu);
242void init_debug_avatar_menu(LLMenuGL* menu); 242void init_debug_avatar_menu(LLMenuGL* menu);
243void init_debug_baked_texture_menu(LLMenuGL* menu); 243void init_debug_baked_texture_menu(LLMenuGL* menu);
244// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) 244// [RLVa:KB]
245#ifdef RLV_DEBUG_TESTS 245#include "rlvhandler.h"
246 #include "rlvtest.h"
247#endif // RLV_DEBUG_TESTS
248#include "rlvfloaterbehaviour.h" 246#include "rlvfloaterbehaviour.h"
249void init_debug_rlva_menu(LLMenuGL* menu); 247void init_debug_rlva_menu(LLMenuGL* menu);
250// [/RLVa:KB] 248// [/RLVa:KB]
@@ -860,7 +858,7 @@ void init_client_menu(LLMenuGL* menu)
860 init_debug_world_menu(sub_menu); 858 init_debug_world_menu(sub_menu);
861 menu->appendMenu(sub_menu); 859 menu->appendMenu(sub_menu);
862 860
863// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.1b 861// [RLVa:KB] - Alternate: Snowglobe-1.2.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.1b
864 #ifdef RLV_ADVANCED_MENU 862 #ifdef RLV_ADVANCED_MENU
865 if (rlv_handler_t::isEnabled()) 863 if (rlv_handler_t::isEnabled())
866 { 864 {
@@ -978,7 +976,7 @@ void init_client_menu(LLMenuGL* menu)
978// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-1.0.0e 976// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-1.0.0e
979 #ifdef RLV_ADVANCED_TOGGLE_RLVA 977 #ifdef RLV_ADVANCED_TOGGLE_RLVA
980 if (gSavedSettings.controlExists(RLV_SETTING_MAIN)) 978 if (gSavedSettings.controlExists(RLV_SETTING_MAIN))
981 menu->append(new LLMenuItemCheckGL("Restrained Life API", &rlvToggleEnabled, NULL, &rlvGetEnabled, NULL)); 979 menu->append(new LLMenuItemCheckGL("RestrainedLove API", &rlvToggleEnabled, NULL, &rlvGetEnabled, NULL));
982 #endif // RLV_ADVANCED_TOGGLE_RLVA 980 #endif // RLV_ADVANCED_TOGGLE_RLVA
983// [/RLVa:KB] 981// [/RLVa:KB]
984 982
@@ -1442,7 +1440,7 @@ void init_debug_baked_texture_menu(LLMenuGL* menu)
1442 menu->createJumpKeys(); 1440 menu->createJumpKeys();
1443} 1441}
1444 1442
1445// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-1.0.0g 1443// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-11-17 (RLVa-1.1.0d) | Modified: RLVa-1.1.0d
1446void init_debug_rlva_menu(LLMenuGL* menu) 1444void init_debug_rlva_menu(LLMenuGL* menu)
1447{ 1445{
1448 // Debug options 1446 // Debug options
@@ -1451,26 +1449,31 @@ void init_debug_rlva_menu(LLMenuGL* menu)
1451 1449
1452 if (gSavedSettings.controlExists(RLV_SETTING_DEBUG)) 1450 if (gSavedSettings.controlExists(RLV_SETTING_DEBUG))
1453 pDbgMenu->append(new LLMenuItemCheckGL("Show Debug Messages", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_DEBUG)); 1451 pDbgMenu->append(new LLMenuItemCheckGL("Show Debug Messages", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_DEBUG));
1452 pDbgMenu->append(new LLMenuItemCallGL("Dump Attachment Locks", RlvHandler::dumpAttachmentLocks, NULL, NULL));
1454 pDbgMenu->appendSeparator(); 1453 pDbgMenu->appendSeparator();
1455 if (gSavedSettings.controlExists(RLV_SETTING_ENABLELEGACYNAMING)) 1454 if (gSavedSettings.controlExists(RLV_SETTING_ENABLELEGACYNAMING))
1456 pDbgMenu->append(new LLMenuItemCheckGL("Enable Legacy Naming", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_ENABLELEGACYNAMING)); 1455 pDbgMenu->append(new LLMenuItemCheckGL("Enable Legacy Naming", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_ENABLELEGACYNAMING));
1456 if (gSavedSettings.controlExists(RLV_SETTING_SHAREDINVAUTORENAME))
1457 pDbgMenu->append(new LLMenuItemCheckGL("Rename Shared Items on Wear", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_SHAREDINVAUTORENAME));
1457 1458
1458 menu->appendMenu(pDbgMenu); 1459 menu->appendMenu(pDbgMenu);
1459 menu->appendSeparator(); 1460 menu->appendSeparator();
1460 } 1461 }
1461 1462
1462 #ifdef RLV_EXTENSION_ENABLE_WEAR 1463 if (gSavedSettings.controlExists(RLV_SETTING_ENABLEWEAR))
1463 if (gSavedSettings.controlExists(RLV_SETTING_ENABLEWEAR)) 1464 menu->append(new LLMenuItemCheckGL("Enable Default Wear", menu_toggle_control, rlvEnableWearEnabler, menu_check_control, (void*)RLV_SETTING_ENABLEWEAR));
1464 menu->append(new LLMenuItemCheckGL("Enable Wear", menu_toggle_control, rlvEnableWearEnabler, menu_check_control, (void*)RLV_SETTING_ENABLEWEAR)); 1465#ifndef RLV_WORKAROUND_REZMULTIPLEATTACH
1465 menu->appendSeparator(); 1466 if (gSavedSettings.controlExists(RLV_SETTING_ENABLESHAREDWEAR))
1466 #endif // RLV_EXTENSION_ENABLE_WEAR 1467 menu->append(new LLMenuItemCheckGL("Enable Shared Wear", menu_toggle_control, rlvEnableSharedWearEnabler, menu_check_control, (void*)RLV_SETTING_ENABLESHAREDWEAR));
1468#endif // RLV_WORKAROUND_REZMULTIPLEATTACH
1469 menu->appendSeparator();
1467 1470
1468 #ifdef RLV_EXTENSION_HIDELOCKED 1471 #ifdef RLV_EXTENSION_HIDELOCKED
1469 if ( (gSavedSettings.controlExists(RLV_SETTING_HIDELOCKEDLAYER)) && 1472 if ( (gSavedSettings.controlExists(RLV_SETTING_HIDELOCKEDLAYER)) &&
1470 (gSavedSettings.controlExists(RLV_SETTING_HIDELOCKEDATTACH)) ) 1473 (gSavedSettings.controlExists(RLV_SETTING_HIDELOCKEDATTACH)) )
1471 { 1474 {
1472 menu->append(new LLMenuItemCheckGL("Hide locked layers", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_HIDELOCKEDLAYER)); 1475 menu->append(new LLMenuItemCheckGL("Hide Locked Layers", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_HIDELOCKEDLAYER));
1473 menu->append(new LLMenuItemCheckGL("Hide locked attachments", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_HIDELOCKEDATTACH)); 1476 menu->append(new LLMenuItemCheckGL("Hide Locked Attachments", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_HIDELOCKEDATTACH));
1474 //sub_menu->append(new LLMenuItemToggleGL("Hide locked inventory", &rlv_handler_t::fHideLockedInventory)); 1477 //sub_menu->append(new LLMenuItemToggleGL("Hide locked inventory", &rlv_handler_t::fHideLockedInventory));
1475 menu->appendSeparator(); 1478 menu->appendSeparator();
1476 } 1479 }
@@ -1671,13 +1674,10 @@ class LLObjectTouch : public view_listener_t
1671 1674
1672 LLPickInfo pick = LLToolPie::getInstance()->getPick(); 1675 LLPickInfo pick = LLToolPie::getInstance()->getPick();
1673 1676
1674// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f 1677// [RLVa:KB] - Checked: 2010-01-01 (RLVa-1.1.0l) | Modified: RLVa-1.1.0l
1675 // TODO-RLVa: this code is rather redundant since we'll never get an active selection to show a pie menu for 1678 if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canTouch(object, pick.mObjectOffset)) )
1676 // [msg->addVector3("Position", pick.mIntersection) <- see llDetectedTouchPos()]
1677 if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && ((!object->isAttachment()) || (!object->permYouOwner())) &&
1678 (dist_vec_squared(gAgent.getPositionAgent(), pick.mIntersection) > 1.5f * 1.5f) )
1679 { 1679 {
1680 return true; // Can't touch in-world objects (or other avie's attachments) farther than 1.5m away under @fartouch=n 1680 return true;
1681 } 1681 }
1682// [/RLVa:KB] 1682// [/RLVa:KB]
1683 1683
@@ -1729,12 +1729,10 @@ class LLObjectEnableTouch : public view_listener_t
1729 { 1729 {
1730 LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); 1730 LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
1731 bool new_value = obj && obj->flagHandleTouch(); 1731 bool new_value = obj && obj->flagHandleTouch();
1732// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-0.2.0f 1732// [RLVa:KB] - Version: 1.23.4 | Checked: 2010-01-01 (RLVa-1.1.0l) | Modified: RLVa-1.1.0l
1733 // TODO-RLVa: this code is rather redundant since we'll never get an active selection to show a pie menu for 1733 if ( (new_value) && (rlv_handler_t::isEnabled()) && (!gRlvHandler.canTouch(obj, LLToolPie::getInstance()->getPick().mObjectOffset)) )
1734 if ( (new_value) && (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && ((!obj->isAttachment()) || (!obj->permYouOwner())) &&
1735 (dist_vec_squared(gAgent.getPositionAgent(), LLToolPie::getInstance()->getPick().mIntersection) > 1.5f * 1.5f) )
1736 { 1734 {
1737 new_value = false; // Can't touch in-world objects (or other avie's attachments) farther than 1.5m away under @fartouch=n 1735 new_value = false;
1738 } 1736 }
1739// [/RLVa:KB] 1737// [/RLVa:KB]
1740 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); 1738 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
@@ -2690,7 +2688,7 @@ class LLAvatarFreeze : public view_listener_t
2690 LLSD args; 2688 LLSD args;
2691// args["AVATAR_NAME"] = fullname; 2689// args["AVATAR_NAME"] = fullname;
2692// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) 2690// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e)
2693 args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : gRlvHandler.getAnonym(fullname); 2691 args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname);
2694// [/RLVa:KB] 2692// [/RLVa:KB]
2695 LLNotifications::instance().add("FreezeAvatarFullname", 2693 LLNotifications::instance().add("FreezeAvatarFullname",
2696 args, 2694 args,
@@ -2819,7 +2817,7 @@ class LLAvatarEject : public view_listener_t
2819// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) 2817// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e)
2820 if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!fullname.empty()) ) 2818 if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!fullname.empty()) )
2821 { 2819 {
2822 fullname = gRlvHandler.getAnonym(fullname); 2820 fullname = RlvStrings::getAnonym(fullname);
2823 } 2821 }
2824// [/RLVa:KB] 2822// [/RLVa:KB]
2825 2823
@@ -3427,10 +3425,9 @@ bool handle_sit_or_stand()
3427 return true; 3425 return true;
3428 } 3426 }
3429 3427
3430// [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0c) 3428// [RLVa:KB] - Checked: 2009-12-22 (RLVa-1.1.0k) | Modified: RLVa-1.1.0j
3431 if ( (rlv_handler_t::isEnabled()) && 3429 // Block if we can't sit on the selected object (also handles sitting and prevented from standing up)
3432 ( ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) && (gAgent.getAvatarObject()) && (gAgent.getAvatarObject()->mIsSitting)) || 3430 if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canSit(object, pick.mObjectOffset)) )
3433 (gRlvHandler.hasBehaviour(RLV_BHVR_SIT)) ) )
3434 { 3431 {
3435 return true; 3432 return true;
3436 } 3433 }
@@ -3446,15 +3443,6 @@ bool handle_sit_or_stand()
3446 3443
3447 if (object && object->getPCode() == LL_PCODE_VOLUME) 3444 if (object && object->getPCode() == LL_PCODE_VOLUME)
3448 { 3445 {
3449// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0g
3450 if ( (rlv_handler_t::isEnabled()) &&
3451 ((gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) || (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH))) &&
3452 (dist_vec_squared(gAgent.getPositionGlobal(), object->getPositionGlobal() + LLVector3d(pick.mObjectOffset)) > 1.5f * 1.5f) )
3453 {
3454 return true; // Don't allow sitting farther away than 1.5m under @sittp=n or @fartouch=n
3455 }
3456// [/RLVa:KB]
3457
3458 gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit); 3446 gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit);
3459 gMessageSystem->nextBlockFast(_PREHASH_AgentData); 3447 gMessageSystem->nextBlockFast(_PREHASH_AgentData);
3460 gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); 3448 gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
@@ -3492,8 +3480,8 @@ class LLLandSit : public view_listener_t
3492{ 3480{
3493 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 3481 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
3494 { 3482 {
3495// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) 3483// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.1.1a) | Modified: RLVa-1.2.0c
3496 if (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) 3484 if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SIT))) )
3497 { 3485 {
3498 return true; 3486 return true;
3499 } 3487 }
@@ -5810,7 +5798,9 @@ class LLObjectEnableSitOrStand : public view_listener_t
5810 new_value = true; 5798 new_value = true;
5811 } 5799 }
5812 } 5800 }
5813 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); 5801// [RLVa:KB] - Checked: 2009-12-22 (RLVa-1.1.0k) | Added: RLVa-1.1.0j
5802// gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
5803// [/RLVa:KB]
5814 5804
5815 // Update label 5805 // Update label
5816 std::string label; 5806 std::string label;
@@ -5826,6 +5816,9 @@ class LLObjectEnableSitOrStand : public view_listener_t
5826 if (sitting_on_selection()) 5816 if (sitting_on_selection())
5827 { 5817 {
5828 label = stand_text; 5818 label = stand_text;
5819// [RLVa:KB] - Checked: 2009-12-22 (RLVa-1.1.0k) | Added: RLVa-1.1.0j
5820 new_value &= !gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT);
5821// [/RLVa:KB]
5829 } 5822 }
5830 else 5823 else
5831 { 5824 {
@@ -5838,8 +5831,22 @@ class LLObjectEnableSitOrStand : public view_listener_t
5838 { 5831 {
5839 label = sit_text; 5832 label = sit_text;
5840 } 5833 }
5834// [RLVa:KB] - Checked: 2009-12-22 (RLVa-1.1.0k) | Added: RLVa-1.1.0j
5835 if ( (rlv_handler_t::isEnabled()) && (new_value) )
5836 {
5837 // RELEASE-RLVa: [2009-12-22] make sure we examine the same object that handle_sit_or_stand() will request a sit for
5838 const LLPickInfo& pick = LLToolPie::getInstance()->getPick();
5839 if (pick.mObjectID.notNull())
5840 {
5841 new_value = gRlvHandler.canSit(pick.getObject(), pick.mObjectOffset);
5842 }
5843 }
5844// [/RLVa:KB]
5841 } 5845 }
5842 gMenuHolder->childSetText("Object Sit", label); 5846 gMenuHolder->childSetText("Object Sit", label);
5847// [RLVa:KB] - Checked: 2009-12-22 (RLVa-1.1.0k) | Added: RLVa-1.1.0j
5848 gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
5849// [/RLVa:KB]
5843 5850
5844 return true; 5851 return true;
5845 } 5852 }
@@ -7579,6 +7586,9 @@ class LLWorldEnableTeleportHome : public view_listener_t
7579 LLViewerRegion* regionp = gAgent.getRegion(); 7586 LLViewerRegion* regionp = gAgent.getRegion();
7580 bool agent_on_prelude = (regionp && regionp->isPrelude()); 7587 bool agent_on_prelude = (regionp && regionp->isPrelude());
7581 bool enable_teleport_home = gAgent.isGodlike() || !agent_on_prelude; 7588 bool enable_teleport_home = gAgent.isGodlike() || !agent_on_prelude;
7589// [RLVa:KB] - Checked: 2009-12-22 (RLVa-1.1.0k) | Added: RLVa-1.1.0j
7590 enable_teleport_home &= !gRlvHandler.hasBehaviour(RLV_BHVR_TPLM);
7591// [/RLVa:KB]
7582 gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_teleport_home); 7592 gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_teleport_home);
7583 return true; 7593 return true;
7584 } 7594 }
@@ -11424,4 +11434,10 @@ void initialize_menus()
11424 addMenu(new RLVaBehaviorsShow(), "RLVa.Behaviors.Show"); 11434 addMenu(new RLVaBehaviorsShow(), "RLVa.Behaviors.Show");
11425// [/RLVa:KB] 11435// [/RLVa:KB]
11426 11436
11437// [RLVa:KB] - Checked: 2010-01-18 (RLVa-1.1.0m) | Added: RLVa-1.1.0m
11438 if (rlv_handler_t::isEnabled())
11439 {
11440 addMenu(new RlvEnableIfNot(), "RLV.EnableIfNot");
11441 }
11442// [/RLVa:KB]
11427} 11443}