diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 9b203f7ca..06f84e9cf 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -263,12 +263,6 @@ LLTimer gLogoutTimer; static const F32 LOGOUT_REQUEST_TIME = 6.f; // this will be cut short by the LogoutReply msg. F32 gLogoutMaxTime = LOGOUT_REQUEST_TIME; -// -LLUUID gSystemFolderRoot; -LLUUID gSystemFolderSettings; -LLUUID gSystemFolderAssets; -// - BOOL gDisconnected = FALSE; // used to restore texture state after a mode switch diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index b894ad17e..1f9b5025c 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -321,12 +321,6 @@ extern LLTimer gLogoutTimer; extern F32 gSimLastTime; extern F32 gSimFrames; -// -extern LLUUID gSystemFolderRoot; -extern LLUUID gSystemFolderSettings; -extern LLUUID gSystemFolderAssets; -// - extern BOOL gDisconnected; extern LLFrameTimer gRestoreGLTimer; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 7ba3bf859..a2658eb35 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -88,8 +88,6 @@ #include "rlvlocks.h" // [/RLVa:KB] -extern LLUUID gSystemFolderRoot; - // Marketplace outbox current disabled #define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 1 #define ENABLE_MERCHANT_SEND_TO_MARKETPLACE_CONTEXT_MENU 1 @@ -385,33 +383,26 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArraygetUUID()); --update[item->getParentUUID()]; ++update[trash_id]; - // - if(!gInventory.isObjectDescendentOf(item->getUUID(), gSystemFolderRoot)) + if(start_new_message) { - // - if(start_new_message) - { - start_new_message = false; - msg->newMessageFast(_PREHASH_MoveInventoryItem); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addBOOLFast(_PREHASH_Stamp, TRUE); - } - msg->nextBlockFast(_PREHASH_InventoryData); - msg->addUUIDFast(_PREHASH_ItemID, item->getUUID()); - msg->addUUIDFast(_PREHASH_FolderID, trash_id); - msg->addString("NewName", NULL); - if(msg->isSendFullFast(_PREHASH_InventoryData)) - { - start_new_message = true; - gAgent.sendReliableMessage(); - gInventory.accountForUpdate(update); - update.clear(); - } - // + start_new_message = false; + msg->newMessageFast(_PREHASH_MoveInventoryItem); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->addBOOLFast(_PREHASH_Stamp, TRUE); + } + msg->nextBlockFast(_PREHASH_InventoryData); + msg->addUUIDFast(_PREHASH_ItemID, item->getUUID()); + msg->addUUIDFast(_PREHASH_FolderID, trash_id); + msg->addString("NewName", NULL); + if(msg->isSendFullFast(_PREHASH_InventoryData)) + { + start_new_message = true; + gAgent.sendReliableMessage(); + gInventory.accountForUpdate(update); + update.clear(); } - // } } if(!start_new_message) @@ -433,32 +424,25 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArraygetUUID()); --update[cat->getParentUUID()]; ++update[trash_id]; - // - if(!gInventory.isObjectDescendentOf(cat->getUUID(), gSystemFolderRoot)) //Avoid fake items. + if(start_new_message) { - // - if(start_new_message) - { - start_new_message = false; - msg->newMessageFast(_PREHASH_MoveInventoryFolder); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addBOOL("Stamp", TRUE); - } - msg->nextBlockFast(_PREHASH_InventoryData); - msg->addUUIDFast(_PREHASH_FolderID, cat->getUUID()); - msg->addUUIDFast(_PREHASH_ParentID, trash_id); - if(msg->isSendFullFast(_PREHASH_InventoryData)) - { - start_new_message = true; - gAgent.sendReliableMessage(); - gInventory.accountForUpdate(update); - update.clear(); - } - // + start_new_message = false; + msg->newMessageFast(_PREHASH_MoveInventoryFolder); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->addBOOL("Stamp", TRUE); + } + msg->nextBlockFast(_PREHASH_InventoryData); + msg->addUUIDFast(_PREHASH_FolderID, cat->getUUID()); + msg->addUUIDFast(_PREHASH_ParentID, trash_id); + if(msg->isSendFullFast(_PREHASH_InventoryData)) + { + start_new_message = true; + gAgent.sendReliableMessage(); + gInventory.accountForUpdate(update); + update.clear(); } - // } } if(!start_new_message) @@ -472,37 +456,6 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray trash problem - if(gInventory.isObjectDescendentOf(*it, gSystemFolderRoot)) - { - // if it's a category, delete descendents - if(gInventory.getCategory(*it)) - { - LLViewerInventoryCategory* cat = gInventory.getCategory(*it); - cat->setDescendentCount(0); - LLInventoryModel::cat_array_t categories; - LLInventoryModel::item_array_t items; - gInventory.collectDescendents(cat->getUUID(), - categories, - items, - false); // include trash? - S32 count = items.count(); - S32 i; - for(i = 0; i < count; ++i) - { - gInventory.deleteObject(items.get(i)->getUUID()); - } - count = categories.count(); - for(i = 0; i < count; ++i) - { - gInventory.deleteObject(categories.get(i)->getUUID()); - } - } - // delete it - gInventory.deleteObject(*it); - } - else - // gInventory.moveObject((*it), trash_id); } @@ -1520,9 +1473,6 @@ void LLItemBridge::selectItem() LLViewerInventoryItem* item = static_cast(getItem()); if(item && !item->isFinished()) { - // - if(!(gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot))) - // //item->fetchFromServer(); LLInventoryModelBackgroundFetch::instance().start(item->getUUID(), false); } @@ -1794,16 +1744,6 @@ BOOL LLItemBridge::removeItem() // Already in trash if (model->isObjectDescendentOf(mUUID, trash_id)) return FALSE; - // trash problem - if(gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot)) - { - LLInventoryModel::LLCategoryUpdate up(item->getParentUUID(), -1); - gInventory.deleteObject(mUUID); - gInventory.accountForUpdate(up); - gInventory.notifyObservers(); - } - // - LLNotification::Params params("ConfirmItemDeleteHasLinks"); params.functor(boost::bind(&LLItemBridge::confirmRemoveItem, this, _1, _2)); diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index fdcfac11c..069508896 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1777,10 +1777,6 @@ bool LLInventoryModel::isCategoryComplete(const LLUUID& cat_id) const } } - // - if((cat_id == gSystemFolderRoot) || gInventory.isObjectDescendentOf(cat_id, gSystemFolderRoot)) return true; - // - return false; } diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 485a96634..fe41db3a6 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1512,10 +1512,9 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL if(!item || !obj) return ACCEPT_NO; // HACK: downcast LLViewerInventoryItem* vitem = (LLViewerInventoryItem*)item; - // - //if(!vitem->isFinished()) return ACCEPT_NO; - if(!vitem->isFinished() && !(gInventory.isObjectDescendentOf(vitem->getUUID(), gSystemFolderRoot))) return ACCEPT_NO; - // + + if(!vitem->isFinished()) return ACCEPT_NO; + if (vitem->getIsLinkType()) return ACCEPT_NO; // No giving away links // deny attempts to drop from an object onto itself. This is to @@ -1980,10 +1979,9 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject( LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); - // - //if(!item || !item->isFinished()) return ACCEPT_NO; - if( !item || (!item->isFinished() && !(gInventory.isObjectDescendentOf(item->getUUID(), gSystemFolderRoot))) ) return ACCEPT_NO; - // + + if(!item || !item->isFinished()) return ACCEPT_NO; + EAcceptance rv = willObjectAcceptInventory(obj, item); if((mask & MASK_CONTROL)) { diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 5f347f8d8..9678a880b 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -293,9 +293,6 @@ void LLViewerInventoryItem::cloneViewerItem(LLPointer& ne void LLViewerInventoryItem::removeFromServer() { - // this check is ghetto - if((mParentUUID == gSystemFolderRoot) || (gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot))) return; - // lldebugs << "Removing inventory item " << mUUID << " from server." << llendl; @@ -314,9 +311,6 @@ void LLViewerInventoryItem::removeFromServer() void LLViewerInventoryItem::updateServer(BOOL is_new) const { - // - if((mParentUUID == gSystemFolderRoot) || (gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot))) return; - // if(!mIsComplete) { // *FIX: deal with this better. @@ -492,9 +486,6 @@ bool LLViewerInventoryItem::exportFileLocal(LLFILE* fp) const void LLViewerInventoryItem::updateParentOnServer(BOOL restamp) const { - // - if(gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot)) return; - // LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_MoveInventoryItem); msg->nextBlockFast(_PREHASH_AgentData); @@ -564,9 +555,6 @@ void LLViewerInventoryCategory::copyViewerCategory(const LLViewerInventoryCatego void LLViewerInventoryCategory::updateParentOnServer(BOOL restamp) const { - // - if(gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot)) return; - // LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_MoveInventoryFolder); msg->nextBlockFast(_PREHASH_AgentData); @@ -631,9 +619,6 @@ void LLViewerInventoryCategory::removeFromServer( void ) bool LLViewerInventoryCategory::fetch() { - // - if((mUUID == gSystemFolderRoot) || (gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot))) return false; - // if((VERSION_UNKNOWN == getVersion()) && (!mDescendentsRequested.getStarted() || mDescendentsRequested.hasExpired())) //Expired check prevents multiple downloads.