aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-11-08 13:23:54 -0700
committerMcCabe Maxsted2009-11-08 13:23:54 -0700
commitd9ecd6fde8f588d8be9a54a3ebc301bab1e99754 (patch)
tree1f595f7577a5134b29e4933d1ce6b4b52e9c1f57 /linden/indra/newview/llviewermenu.cpp
parentMerged working branch of 1.2 into LL 1.23 merge (diff)
parentChanged version to 1.20 in other files (diff)
downloadmeta-impy-d9ecd6fde8f588d8be9a54a3ebc301bab1e99754.zip
meta-impy-d9ecd6fde8f588d8be9a54a3ebc301bab1e99754.tar.gz
meta-impy-d9ecd6fde8f588d8be9a54a3ebc301bab1e99754.tar.bz2
meta-impy-d9ecd6fde8f588d8be9a54a3ebc301bab1e99754.tar.xz
Merged almost-final version of Imprudence 1.2 into 1.3
Diffstat (limited to 'linden/indra/newview/llviewermenu.cpp')
-rw-r--r--linden/indra/newview/llviewermenu.cpp163
1 files changed, 113 insertions, 50 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index b129bff..cebd6fd 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -2190,8 +2190,9 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t
2190 LLVOAvatar::attachment_map_t::iterator curiter = iter++; 2190 LLVOAvatar::attachment_map_t::iterator curiter = iter++;
2191 LLViewerJointAttachment* attachment = curiter->second; 2191 LLViewerJointAttachment* attachment = curiter->second;
2192// if (attachment->getObject()) 2192// if (attachment->getObject())
2193// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0c 2193// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a
2194 if ( (attachment->getObject()) && ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.isDetachable(curiter->first)) ) ) 2194 if ( (attachment->getObject()) &&
2195 ((!rlv_handler_t::isEnabled()) || (!gRlvHandler.isLockedAttachment(curiter->first, RLV_LOCK_REMOVE))) )
2195// [/RLVa:KB] 2196// [/RLVa:KB]
2196 { 2197 {
2197 new_value = true; 2198 new_value = true;
@@ -2428,26 +2429,45 @@ class LLObjectImportUpload : public view_listener_t
2428 } 2429 }
2429}; 2430};
2430 2431
2431bool handle_go_to() 2432bool handle_go_to_confirm()
2432{ 2433{
2433// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) 2434// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c)
2434 if ( (rlv_handler_t::isEnabled()) && gAgent.forwardGrabbed() && (gRlvHandler.hasLockedAttachment()) ) 2435 if ( (rlv_handler_t::isEnabled()) && (gAgent.forwardGrabbed()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) )
2435 { 2436 {
2436 return true; 2437 return true;
2437 } 2438 }
2438// [/RLVa:KB] 2439// [/RLVa:KB]
2439 2440
2440 if (gSavedSettings.getBOOL("DoubleClickTeleport")) 2441 std::string action = gSavedSettings.getString("GoAction");
2442 LLStringUtil::toLower(action);
2443
2444 if (action == "teleport")
2441 { 2445 {
2442 gViewerWindow->alertXml("ConfirmDoubleClickTP", handle_go_to_callback, (void*)LLToolPie::getInstance()); 2446 gViewerWindow->alertXml("ConfirmDoubleClickTP", handle_go_to_callback, (void*)LLToolPie::getInstance());
2443 } 2447 }
2444 else if (gSavedSettings.getBOOL("DoubleClickAutoPilot")) 2448 else if (action == "autopilot")
2445 { 2449 {
2446 gViewerWindow->alertXml("ConfirmAutoPilot", handle_go_to_callback, (void*)LLToolPie::getInstance()); 2450 gViewerWindow->alertXml("ConfirmAutoPilot", handle_go_to_callback, (void*)LLToolPie::getInstance());
2447 } 2451 }
2448 return true; 2452 return true;
2449} 2453}
2450 2454
2455
2456bool handle_go_to()
2457{
2458// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a
2459 if ( (rlv_handler_t::isEnabled()) && (gAgent.forwardGrabbed()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) )
2460 {
2461 return true;
2462 }
2463 // [/RLVa:KB]
2464
2465 handle_go_to_callback( 0, (void*)LLToolPie::getInstance() );
2466
2467 return true;
2468}
2469
2470
2451//static 2471//static
2452void handle_go_to_callback(S32 option, void *userdata) 2472void handle_go_to_callback(S32 option, void *userdata)
2453{ 2473{
@@ -2459,13 +2479,17 @@ void handle_go_to_callback(S32 option, void *userdata)
2459 std::vector<std::string> strings; 2479 std::vector<std::string> strings;
2460 std::string val; 2480 std::string val;
2461 LLVector3d pos = pie->getPick().mPosGlobal; 2481 LLVector3d pos = pie->getPick().mPosGlobal;
2462 if (gSavedSettings.getBOOL("DoubleClickTeleport")) 2482
2483 std::string action = gSavedSettings.getString("GoAction");
2484 LLStringUtil::toLower(action);
2485
2486 if (action == "teleport")
2463 { 2487 {
2464 LLVector3d hips_offset(0.0f, 0.0f, 1.2f); 2488 LLVector3d hips_offset(0.0f, 0.0f, 1.2f);
2465 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); 2489 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
2466 gAgent.teleportViaLocation(pos + hips_offset); 2490 gAgent.teleportViaLocation(pos + hips_offset);
2467 } 2491 }
2468 else 2492 else if (action == "autopilot")
2469 { 2493 {
2470 // JAMESDEBUG try simulator autopilot 2494 // JAMESDEBUG try simulator autopilot
2471 std::vector<std::string> strings; 2495 std::vector<std::string> strings;
@@ -2493,6 +2517,10 @@ void handle_go_to_callback(S32 option, void *userdata)
2493 // Could be first use 2517 // Could be first use
2494 LLFirstUse::useGoTo(); 2518 LLFirstUse::useGoTo();
2495 } 2519 }
2520 else
2521 {
2522 llwarns << "Unhandled GoAction setting: " << action << llendl;
2523 }
2496 } 2524 }
2497} 2525}
2498 2526
@@ -4710,8 +4738,8 @@ class LLToolsReleaseKeys : public view_listener_t
4710{ 4738{
4711 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 4739 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
4712 { 4740 {
4713// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) 4741// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a
4714 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) 4742 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) )
4715 { 4743 {
4716 return true; 4744 return true;
4717 } 4745 }
@@ -4727,9 +4755,9 @@ class LLToolsEnableReleaseKeys : public view_listener_t
4727{ 4755{
4728 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 4756 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
4729 { 4757 {
4730// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) 4758// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a
4731 gMenuHolder->findControl(userdata["control"].asString())->setValue( 4759 gMenuHolder->findControl(userdata["control"].asString())->setValue(
4732 gAgent.anyControlGrabbed() && ( (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasLockedAttachment() ) ) ); 4760 gAgent.anyControlGrabbed() && ( (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE) ) ) );
4733// [/RLVa:KB] 4761// [/RLVa:KB]
4734 //gMenuHolder->findControl(userdata["control"].asString())->setValue( gAgent.anyControlGrabbed() ); 4762 //gMenuHolder->findControl(userdata["control"].asString())->setValue( gAgent.anyControlGrabbed() );
4735 return true; 4763 return true;
@@ -6100,11 +6128,13 @@ private:
6100 if (index > 0) 6128 if (index > 0)
6101 attachment_point = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL); 6129 attachment_point = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL);
6102 6130
6103// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) 6131// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a
6104 if ( (rlv_handler_t::isEnabled()) && 6132 if ( (rlv_handler_t::isEnabled()) &&
6105 ( ((index == 0) && (gRlvHandler.hasLockedAttachment())) || // Can't wear on default attach point 6133 ( ((index == 0) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY))) || // Can't wear on default attach point
6106 ((index > 0) && (!gRlvHandler.isDetachable(attachment_point))) || // Can't replace locked attachment 6134 ((index > 0) && // or replace a locked attachment
6107 (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) ) // Attach on rezzed object == "Take" 6135 ((gRlvHandler.isLockedAttachment(attachment_point->getObject(), RLV_LOCK_REMOVE)) ||
6136 (gRlvHandler.isLockedAttachment(attachment_point, RLV_LOCK_ADD)) ) ) || // or wear on a non-attachable attach point
6137 (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) ) // Attach on rezzed object == "Take"
6108 { 6138 {
6109 setObjectSelection(NULL); // Clear the selection or it'll get stuck 6139 setObjectSelection(NULL); // Clear the selection or it'll get stuck
6110 return true; 6140 return true;
@@ -6218,15 +6248,15 @@ class LLAttachmentDrop : public view_listener_t
6218 return true; 6248 return true;
6219 } 6249 }
6220 6250
6221// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) 6251// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a
6222 if (rlv_handler_t::isEnabled()) 6252 if (rlv_handler_t::isEnabled())
6223 { 6253 {
6224 if (gRlvHandler.hasLockedAttachment()) 6254 if (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE))
6225 { 6255 {
6226 // NOTE: copy/paste of the code in enable_detach() 6256 // NOTE: copy/paste of the code in enable_detach()
6227 LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); 6257 LLObjectSelectionHandle hSelection = LLSelectMgr::getInstance()->getSelection();
6228 RlvSelectHasLockedAttach functor; 6258 RlvSelectHasLockedAttach functor(RLV_LOCK_REMOVE);
6229 if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) ) 6259 if ( (hSelection->isAttachment()) && (hSelection->getFirstRootNode(&functor, FALSE)) )
6230 return true; 6260 return true;
6231 } 6261 }
6232 else if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) 6262 else if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ))
@@ -6254,8 +6284,8 @@ void handle_detach_from_avatar(void* user_data)
6254 6284
6255 if (attached_object) 6285 if (attached_object)
6256 { 6286 {
6257// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0d 6287// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a
6258 if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(attached_object)) ) 6288 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.isLockedAttachment(attached_object, RLV_LOCK_REMOVE)) )
6259 { 6289 {
6260 return; 6290 return;
6261 } 6291 }
@@ -6343,12 +6373,12 @@ class LLAttachmentDetach : public view_listener_t
6343 return true; 6373 return true;
6344 } 6374 }
6345 6375
6346// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) 6376// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5) | Modified: RLVa-1.0.5
6347 // NOTE: copy/paste of the code in enable_detach() 6377 // NOTE: copy/paste of the code in enable_detach()
6348 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) 6378 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) )
6349 { 6379 {
6350 LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); 6380 LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection();
6351 RlvSelectHasLockedAttach functor; 6381 RlvSelectHasLockedAttach functor(RLV_LOCK_REMOVE);
6352 if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) ) 6382 if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) )
6353 return FALSE; 6383 return FALSE;
6354 } 6384 }
@@ -6460,16 +6490,16 @@ BOOL enable_detach(void*)
6460 // ...if it's you, good to detach 6490 // ...if it's you, good to detach
6461 if (avatar->getID() == gAgent.getID()) 6491 if (avatar->getID() == gAgent.getID())
6462 { 6492 {
6463// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) 6493// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5) | Modified: RLVa-1.0.5
6464 // NOTE: this code is reused as-is in LLAttachmentDetach::handleEvent() and LLAttachmentDrop::handleEvent() 6494 // 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) 6495 // so any changes here should be reflected there as well
6466 6496
6467 // RELEASE-RLVa: LLSelectMgr::sendDetach() and LLSelectMgr::sendDropAttachment() call sendListToRegions with 6497 // 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 6498 // SEND_ONLY_ROOTS so we only need to examine the roots which saves us time
6469 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) 6499 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) )
6470 { 6500 {
6471 LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); 6501 LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection();
6472 RlvSelectHasLockedAttach functor; 6502 RlvSelectHasLockedAttach functor(RLV_LOCK_REMOVE);
6473 if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) ) 6503 if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) )
6474 return FALSE; 6504 return FALSE;
6475 } 6505 }
@@ -6496,7 +6526,7 @@ class LLAttachmentEnableDetach : public view_listener_t
6496// Used to tell if the selected object can be attached to your avatar. 6526// Used to tell if the selected object can be attached to your avatar.
6497BOOL object_selected_and_point_valid(void *user_data) 6527BOOL object_selected_and_point_valid(void *user_data)
6498{ 6528{
6499// [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) 6529// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5) | Modified: RLVa-1.0.5
6500 if (rlv_handler_t::isEnabled()) 6530 if (rlv_handler_t::isEnabled())
6501 { 6531 {
6502 // RELEASE-RLVa: look at the caller graph for this function on every new release 6532 // RELEASE-RLVa: look at the caller graph for this function on every new release
@@ -6506,9 +6536,11 @@ BOOL object_selected_and_point_valid(void *user_data)
6506 // - enabler set up in LLVOAvatar::buildCharacter() => Rezzed prim / right-click / "Attach >" [user_data == pAttachPt] 6536 // - 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] 6537 // - enabler set up in LLVOAvatar::buildCharacter() => Rezzed prim / Edit menu / "Attach Object" [user_data == pAttachPt]
6508 LLViewerJointAttachment* pAttachPt = (LLViewerJointAttachment*)user_data; 6538 LLViewerJointAttachment* pAttachPt = (LLViewerJointAttachment*)user_data;
6509 if ( ((!pAttachPt) && (gRlvHandler.hasLockedAttachment())) || // Don't allow attach to default attach point 6539 if ( ( (!pAttachPt) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) || // Don't allow attach to default attach point
6510 ((pAttachPt) && (!gRlvHandler.isDetachable(pAttachPt))) || // Don't allow replacing of locked attachment 6540 ( (pAttachPt) && // Don't allow replacing of a locked attachment
6511 (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) // Attaching a rezzed object == "Take" 6541 ( (gRlvHandler.isLockedAttachment(pAttachPt->getObject(), RLV_LOCK_REMOVE)) ||
6542 (gRlvHandler.isLockedAttachment(pAttachPt, RLV_LOCK_ADD)) ) ) || // or wear on a non-attachable attach point
6543 (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) // Attaching a rezzed object == "Take"
6512 { 6544 {
6513 return FALSE; 6545 return FALSE;
6514 } 6546 }
@@ -6585,7 +6617,7 @@ BOOL object_attached(void *user_data)
6585// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) 6617// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c)
6586 return ( 6618 return (
6587 (attachment->getObject() != NULL) && 6619 (attachment->getObject() != NULL) &&
6588 ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.isDetachable(attachment->getObject())) ) 6620 ( (!rlv_handler_t::isEnabled()) || (!gRlvHandler.isLockedAttachment(attachment->getObject(), RLV_LOCK_REMOVE)) )
6589 ); 6621 );
6590// [/RLVa:KB] 6622// [/RLVa:KB]
6591// return attachment->getObject() != NULL; 6623// return attachment->getObject() != NULL;
@@ -6737,12 +6769,13 @@ class LLToolsSelectedScriptAction : public view_listener_t
6737{ 6769{
6738 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) 6770 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
6739 { 6771 {
6740// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) 6772// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a
6741 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) 6773 // We'll allow resetting the scripts of objects on a non-attachable attach point since they wouldn't be able to circumvent anything
6774 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) )
6742 { 6775 {
6743 LLObjectSelectionHandle selectHandle = LLSelectMgr::getInstance()->getSelection(); 6776 LLObjectSelectionHandle hSelection = LLSelectMgr::getInstance()->getSelection();
6744 RlvSelectHasLockedAttach functor; 6777 RlvSelectHasLockedAttach functor(RLV_LOCK_REMOVE);
6745 if ( (selectHandle->isAttachment()) && (selectHandle->getFirstNode(&functor)) ) 6778 if ( (hSelection->isAttachment()) && (hSelection->getFirstNode(&functor)) )
6746 return true; 6779 return true;
6747 } 6780 }
6748// [/RLVa:KB] 6781// [/RLVa:KB]
@@ -6831,9 +6864,9 @@ void handle_dump_image_list(void*)
6831 6864
6832void handle_test_male(void*) 6865void handle_test_male(void*)
6833{ 6866{
6834// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) 6867// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a
6835 if ( (rlv_handler_t::isEnabled()) && 6868 if ( (rlv_handler_t::isEnabled()) &&
6836 ( (gRlvHandler.hasLockedAttachment()) || 6869 ( (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ||
6837 (gRlvHandler.hasBehaviour(RLV_BHVR_ADDOUTFIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_REMOUTFIT)) ) ) 6870 (gRlvHandler.hasBehaviour(RLV_BHVR_ADDOUTFIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_REMOUTFIT)) ) )
6838 { 6871 {
6839 return; 6872 return;
@@ -6846,9 +6879,9 @@ void handle_test_male(void*)
6846 6879
6847void handle_test_female(void*) 6880void handle_test_female(void*)
6848{ 6881{
6849// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) 6882// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a
6850 if ( (rlv_handler_t::isEnabled()) && 6883 if ( (rlv_handler_t::isEnabled()) &&
6851 ( (gRlvHandler.hasLockedAttachment()) || 6884 ( (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ||
6852 (gRlvHandler.hasBehaviour(RLV_BHVR_ADDOUTFIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_REMOUTFIT)) ) ) 6885 (gRlvHandler.hasBehaviour(RLV_BHVR_ADDOUTFIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_REMOUTFIT)) ) )
6853 { 6886 {
6854 return; 6887 return;
@@ -6990,16 +7023,16 @@ BOOL enable_more_than_one_selected(void* )
6990 7023
6991static bool is_editable_selected() 7024static bool is_editable_selected()
6992{ 7025{
6993// [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-1.0.0c 7026// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a
6994 // RELEASE-RLVa: check that this still isn't called by anything but script actions in the Tools menu 7027 // 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()) ) 7028 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) )
6996 { 7029 {
6997 LLObjectSelectionHandle selectHandle = LLSelectMgr::getInstance()->getSelection(); 7030 LLObjectSelectionHandle hSelection = LLSelectMgr::getInstance()->getSelection();
6998 7031
6999 // NOTE: this is called for 5 different menu items so we'll trade accuracy for efficiency and only 7032 // 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) 7033 // examine root nodes (LLToolsSelectedScriptAction::handleEvent() will catch what we miss)
7001 RlvSelectHasLockedAttach functor; 7034 RlvSelectHasLockedAttach functor(RLV_LOCK_REMOVE);
7002 if ( (selectHandle->isAttachment()) && (selectHandle->getFirstRootNode(&functor)) ) 7035 if ( (hSelection->isAttachment()) && (hSelection->getFirstRootNode(&functor)) )
7003 { 7036 {
7004 return false; 7037 return false;
7005 } 7038 }
@@ -10452,6 +10485,35 @@ class LLAvatarReportAbuse : public view_listener_t
10452 10485
10453 10486
10454 10487
10488////////////////////////////
10489// ALLOW MULTIPLE VIEWERS //
10490////////////////////////////
10491
10492
10493class LLAdvancedToggleMultipleViewers : public view_listener_t
10494{
10495 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
10496 {
10497 BOOL cur_val = gSavedSettings.getBOOL("AllowMultipleViewers");
10498 gSavedSettings.setBOOL("AllowMultipleViewers", !cur_val );
10499 return true;
10500 }
10501};
10502
10503
10504class LLAdvancedCheckMultipleViewers : public view_listener_t
10505{
10506 bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
10507 {
10508 bool new_value = gSavedSettings.getBOOL("AllowMultipleViewers");
10509 std::string control_name = userdata["control"].asString();
10510 gMenuHolder->findControl(control_name)->setValue(new_value);
10511 return true;
10512 }
10513};
10514
10515
10516
10455/////////////// 10517///////////////
10456// RLVa Main // 10518// RLVa Main //
10457/////////////// 10519///////////////
@@ -10893,7 +10955,8 @@ void initialize_menus()
10893 addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions"); 10955 addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions");
10894 addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus"); 10956 addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus");
10895 addMenu(new LLAdvancedLeaveAdminStatus(), "Advanced.LeaveAdminStatus"); 10957 addMenu(new LLAdvancedLeaveAdminStatus(), "Advanced.LeaveAdminStatus");
10896 10958 addMenu(new LLAdvancedToggleMultipleViewers(), "Advanced.ToggleMultipleViewers");
10959 addMenu(new LLAdvancedCheckMultipleViewers(), "Advanced.CheckMultipleViewers");
10897 10960
10898 // RLVa 10961 // RLVa
10899 addMenu(new RLVaMainToggle(), "RLVa.Main.Toggle"); 10962 addMenu(new RLVaMainToggle(), "RLVa.Main.Toggle");