diff options
Diffstat (limited to 'linden/indra/newview/llpanelinventory.cpp')
-rw-r--r-- | linden/indra/newview/llpanelinventory.cpp | 51 |
1 files changed, 32 insertions, 19 deletions
diff --git a/linden/indra/newview/llpanelinventory.cpp b/linden/indra/newview/llpanelinventory.cpp index 0ae2aec..d45b9d5 100644 --- a/linden/indra/newview/llpanelinventory.cpp +++ b/linden/indra/newview/llpanelinventory.cpp | |||
@@ -368,9 +368,9 @@ void LLTaskInvFVBridge::previewItem() | |||
368 | 368 | ||
369 | BOOL LLTaskInvFVBridge::isItemRenameable() const | 369 | BOOL LLTaskInvFVBridge::isItemRenameable() const |
370 | { | 370 | { |
371 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 371 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
372 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); | 372 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); |
373 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | 373 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE)) ) |
374 | { | 374 | { |
375 | return FALSE; | 375 | return FALSE; |
376 | } | 376 | } |
@@ -394,8 +394,8 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const | |||
394 | BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name) | 394 | BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name) |
395 | { | 395 | { |
396 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); | 396 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); |
397 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 397 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
398 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | 398 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE)) ) |
399 | { | 399 | { |
400 | return TRUE; // Fallback code [see LLTaskInvFVBridge::isItemRenameable()] | 400 | return TRUE; // Fallback code [see LLTaskInvFVBridge::isItemRenameable()] |
401 | } | 401 | } |
@@ -426,13 +426,13 @@ BOOL LLTaskInvFVBridge::isItemMovable() | |||
426 | // return TRUE; | 426 | // return TRUE; |
427 | //} | 427 | //} |
428 | //return FALSE; | 428 | //return FALSE; |
429 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0g | 429 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
430 | if (rlv_handler_t::isEnabled()) | 430 | if (rlv_handler_t::isEnabled()) |
431 | { | 431 | { |
432 | LLViewerObject* pObj = gObjectList.findObject(mPanel->getTaskUUID()); | 432 | LLViewerObject* pObj = gObjectList.findObject(mPanel->getTaskUUID()); |
433 | if (pObj) | 433 | if (pObj) |
434 | { | 434 | { |
435 | if (!gRlvHandler.isDetachable(pObj)) | 435 | if (gRlvHandler.isLockedAttachment(pObj, RLV_LOCK_REMOVE)) |
436 | { | 436 | { |
437 | return FALSE; | 437 | return FALSE; |
438 | } | 438 | } |
@@ -451,10 +451,10 @@ BOOL LLTaskInvFVBridge::isItemMovable() | |||
451 | BOOL LLTaskInvFVBridge::isItemRemovable() | 451 | BOOL LLTaskInvFVBridge::isItemRemovable() |
452 | { | 452 | { |
453 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); | 453 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); |
454 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0g | 454 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
455 | if ( (object) && (rlv_handler_t::isEnabled()) ) | 455 | if ( (object) && (rlv_handler_t::isEnabled()) ) |
456 | { | 456 | { |
457 | if (!gRlvHandler.isDetachable(object)) | 457 | if (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE)) |
458 | { | 458 | { |
459 | return FALSE; | 459 | return FALSE; |
460 | } | 460 | } |
@@ -611,9 +611,9 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const | |||
611 | const LLPermissions& perm = inv->getPermissions(); | 611 | const LLPermissions& perm = inv->getPermissions(); |
612 | bool can_copy = gAgent.allowOperation(PERM_COPY, perm, | 612 | bool can_copy = gAgent.allowOperation(PERM_COPY, perm, |
613 | GP_OBJECT_MANIPULATE); | 613 | GP_OBJECT_MANIPULATE); |
614 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 614 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
615 | // Kind of redundant due to the note below, but in case that ever gets fixed | 615 | // Kind of redundant due to the note below, but in case that ever gets fixed |
616 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | 616 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE)) ) |
617 | { | 617 | { |
618 | return FALSE; | 618 | return FALSE; |
619 | } | 619 | } |
@@ -735,12 +735,16 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
735 | { | 735 | { |
736 | disabled_items.push_back(std::string("Task Open")); | 736 | disabled_items.push_back(std::string("Task Open")); |
737 | } | 737 | } |
738 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 738 | // [RLVa:KB] - Checked: 2009-10-13 (RLVa-1.0.5c) | Modified: RLVa-1.0.5c |
739 | else if ( (rlv_handler_t::isEnabled()) && | 739 | else if (rlv_handler_t::isEnabled()) |
740 | ((LLAssetType::AT_LSL_TEXT == item->getType()) || (LLAssetType::AT_NOTECARD == item->getType())) && | ||
741 | (!gRlvHandler.isDetachable(gObjectList.findObject(mPanel->getTaskUUID()))) ) | ||
742 | { | 740 | { |
743 | disabled_items.push_back(std::string("Task Open")); | 741 | bool fLocked = gRlvHandler.isLockedAttachment(gObjectList.findObject(mPanel->getTaskUUID()), RLV_LOCK_REMOVE); |
742 | if ( ((LLAssetType::AT_LSL_TEXT == item->getType()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_VIEWSCRIPT)) || (fLocked))) || | ||
743 | ((LLAssetType::AT_NOTECARD == item->getType()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_VIEWNOTE)) || (fLocked))) || | ||
744 | ((LLAssetType::AT_NOTECARD == item->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE))) ) | ||
745 | { | ||
746 | disabled_items.push_back(std::string("Task Open")); | ||
747 | } | ||
744 | } | 748 | } |
745 | // [/RLVa:KB] | 749 | // [/RLVa:KB] |
746 | } | 750 | } |
@@ -967,6 +971,13 @@ LLUIImagePtr LLTaskTextureBridge::getIcon() const | |||
967 | 971 | ||
968 | void LLTaskTextureBridge::openItem() | 972 | void LLTaskTextureBridge::openItem() |
969 | { | 973 | { |
974 | // [RLVa:KB] - Checked: 2009-10-13 (RLVa-1.0.5c) | Added: RLVa-1.0.5c | ||
975 | if (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE)) | ||
976 | { | ||
977 | return; | ||
978 | } | ||
979 | // [/RLVa:KB] | ||
980 | |||
970 | llinfos << "LLTaskTextureBridge::openItem()" << llendl; | 981 | llinfos << "LLTaskTextureBridge::openItem()" << llendl; |
971 | if(!LLPreview::show(mUUID)) | 982 | if(!LLPreview::show(mUUID)) |
972 | { | 983 | { |
@@ -1248,9 +1259,10 @@ LLTaskLSLBridge::LLTaskLSLBridge( | |||
1248 | 1259 | ||
1249 | void LLTaskLSLBridge::openItem() | 1260 | void LLTaskLSLBridge::openItem() |
1250 | { | 1261 | { |
1251 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 1262 | // [RLVa:KB] - Checked: 2009-10-13 (RLVa-1.0.5c) | Modified: RLVa-1.0.5c |
1252 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); | 1263 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); |
1253 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | 1264 | if ( (rlv_handler_t::isEnabled()) && |
1265 | ((gRlvHandler.hasBehaviour(RLV_BHVR_VIEWSCRIPT)) || (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE))) ) | ||
1254 | { | 1266 | { |
1255 | return; | 1267 | return; |
1256 | } | 1268 | } |
@@ -1376,8 +1388,9 @@ void LLTaskNotecardBridge::openItem() | |||
1376 | { | 1388 | { |
1377 | return; | 1389 | return; |
1378 | } | 1390 | } |
1379 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 1391 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
1380 | if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_VIEWNOTE)) || (!gRlvHandler.isDetachable(object))) ) | 1392 | if ( (rlv_handler_t::isEnabled()) && |
1393 | ( (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWNOTE)) || (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE)) ) ) | ||
1381 | { | 1394 | { |
1382 | return; | 1395 | return; |
1383 | } | 1396 | } |