From 6185b0fb0ca880772de44100eb0c9a201487f8d3 Mon Sep 17 00:00:00 2001 From: Hazim Gazov Date: Thu, 22 Apr 2010 04:01:45 -0300 Subject: [PATCH] pushing what I have for tonight --- indra/llui/llview.cpp | 44 +- indra/llui/llview.h | 11 +- indra/newview/llinventorybridge.cpp | 904 ++++++++++++++-------------- indra/newview/llinventoryview.cpp | 3 + indra/newview/llinventoryview.h | 13 +- 5 files changed, 524 insertions(+), 451 deletions(-) diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index f8bacd1ea..68fba01c8 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -56,6 +56,10 @@ #include "lltexteditor.h" #include "lltextbox.h" +// +#include "lldelayeduidelete.h" +// + //HACK: this allows you to instantiate LLView from xml with "" which we don't want static LLRegisterWidget r("view"); @@ -87,7 +91,10 @@ LLView::LLView() : mUseBoundingRect(FALSE), mVisible(TRUE), mNextInsertionOrdinal(0), - mHoverCursor(UI_CURSOR_ARROW) + mHoverCursor(UI_CURSOR_ARROW), + // + mDelayedDelete(FALSE) + // { } @@ -105,7 +112,10 @@ LLView::LLView(const std::string& name, BOOL mouse_opaque) : mUseBoundingRect(FALSE), mVisible(TRUE), mNextInsertionOrdinal(0), - mHoverCursor(UI_CURSOR_ARROW) + mHoverCursor(UI_CURSOR_ARROW), + // + mDelayedDelete(FALSE) + // { } @@ -127,7 +137,10 @@ LLView::LLView( mUseBoundingRect(FALSE), mVisible(TRUE), mNextInsertionOrdinal(0), - mHoverCursor(UI_CURSOR_ARROW) + mHoverCursor(UI_CURSOR_ARROW), + // + mDelayedDelete(FALSE) + // { } @@ -143,7 +156,10 @@ LLView::~LLView() gFocusMgr.removeMouseCaptureWithoutCallback( this ); } - deleteAllChildren(); + // TESTZONE DERF + //deleteAllChildren(); + deleteAllChildren(mDelayedDelete); + // if (mParentView != NULL) { @@ -575,8 +591,26 @@ BOOL LLView::focusPrev(LLView::child_list_t & result) // delete all children. Override this function if you need to // perform any extra clean up such as cached pointers to selected // children, etc. -void LLView::deleteAllChildren() +// +//void LLView::deleteAllChildren() +void LLView::deleteAllChildren(BOOL delay_delete) +// { + // TESTZONE DERF + if(delay_delete) + { + child_list_t::iterator end = mChildList.end(); + for(child_list_t::iterator iter = mChildList.begin(); iter != end; ++iter) + { + if((*iter)->getParent() == this) + (*iter)->mParentView = NULL; + } + mCtrlOrder.clear(); + std::list children(mChildList); + gDeleteScheduler->addViewDeleteJob(children); + return; + } + // // clear out the control ordering mCtrlOrder.clear(); diff --git a/indra/llui/llview.h b/indra/llui/llview.h index ddb7371c8..9c088ca47 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -331,7 +331,10 @@ public: // delete all children. Override this function if you need to // perform any extra clean up such as cached pointers to selected // children, etc. - virtual void deleteAllChildren(); + // + //virtual void deleteAllChildren(); + virtual void deleteAllChildren(BOOL delay_delete = FALSE); + // virtual void setTentative(BOOL b); virtual BOOL getTentative() const; @@ -653,6 +656,12 @@ private: S32 mNextInsertionOrdinal; + // +public: + BOOL mDelayedDelete; + // +private: + static LLWindow* sWindow; // All root views must know about their window. typedef std::map > dispatch_list_t; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index b8a49ed4b..6e0999a58 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -86,15 +86,15 @@ #include "lluictrlfactory.h" #include "llselectmgr.h" #include "llfloateropenobject.h" -// -#include "llappviewer.h" // gLocalInventoryRoot -#include "llfloateranimpreview.h" // for reuploads -#include "llfloaterimagepreview.h" // for reuploads -#include "llimportobject.h" // for disabling options during import -//#include "llcheats.h" -#include "dofloaterhex.h" -#include "hgfloatertexteditor.h" -// +// +#include "llappviewer.h" // gLocalInventoryRoot +#include "llfloateranimpreview.h" // for reuploads +#include "llfloaterimagepreview.h" // for reuploads +#include "llimportobject.h" // for disabling options during import +//#include "llcheats.h" +#include "dofloaterhex.h" +#include "hgfloatertexteditor.h" +// // Helpers // bug in busy count inc/dec right now, logic is complex... do we really need it? @@ -119,21 +119,21 @@ void wear_inventory_category_on_avatar_loop(LLWearable* wearable, void*); void wear_inventory_category_on_avatar_step3(LLWearableHoldingPattern* holder, BOOL append); void remove_inventory_category_from_avatar(LLInventoryCategory* category); void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata); -bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, LLMoveInv*); -void confirm_replace_attachment_rez(S32 option, void* user_data); -// -void gotImageForSaveItemAs(BOOL success, - LLViewerImage *src_vi, - LLImageRaw* src, - LLImageRaw* aux_src, - S32 discard_level, - BOOL final, - void* userdata); -void gotAssetForSaveItemAs(LLVFS *vfs, - const LLUUID& asset_uuid, - LLAssetType::EType type, - void* user_data, S32 status, LLExtStat ext_status); -// +bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, LLMoveInv*); +void confirm_replace_attachment_rez(S32 option, void* user_data); +// +void gotImageForSaveItemAs(BOOL success, + LLViewerImage *src_vi, + LLImageRaw* src, + LLImageRaw* aux_src, + S32 discard_level, + BOOL final, + void* userdata); +void gotAssetForSaveItemAs(LLVFS *vfs, + const LLUUID& asset_uuid, + LLAssetType::EType type, + void* user_data, S32 status, LLExtStat ext_status); +// std::string ICON_NAME[ICON_NAME_COUNT] = { @@ -212,24 +212,24 @@ time_t LLInvFVBridge::getCreationDate() const // Can be destoryed (or moved to trash) BOOL LLInvFVBridge::isItemRemovable() { - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return FALSE; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return FALSE; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return FALSE; - // - //if(model->isObjectDescendentOf(mUUID, gAgent.getInventoryRootID())) - //{ - // return TRUE; - //} - // - //return FALSE; + // + //if(model->isObjectDescendentOf(mUUID, gAgent.getInventoryRootID())) + //{ + // return TRUE; + //} + // + //return FALSE; return TRUE; - // + // } // Can be moved to another folder @@ -246,13 +246,13 @@ void LLInvFVBridge::showProperties() void LLInvFVBridge::removeBatch(LLDynamicArray& batch) { - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return; + } + // // Deactivate gestures when moving them into Trash LLInvFVBridge* bridge; LLInventoryModel* model = mInventoryPanel->getModel(); @@ -297,13 +297,13 @@ void LLInvFVBridge::removeBatch(LLDynamicArray& batc void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray& batch) { - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return; + } + // // this method moves a bunch of items and folders to the trash. As // per design guidelines for the inventory model, the message is // built and the accounting is performed first. After all of that, @@ -321,7 +321,18 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray close floaters first + // close floaters first + for(i = 0; i < count; ++i) + { + bridge = (LLInvFVBridge*)(batch.get(i)); + if(!bridge || !bridge->isItemRemovable()) continue; + item = (LLViewerInventoryItem*)model->getItem(bridge->getUUID()); + if(item) + { + LLPreview::hide(item->getUUID()); + } + } + // for(i = 0; i < count; ++i) { bridge = (LLInvFVBridge*)(batch.get(i)); @@ -329,28 +340,17 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArraygetItem(bridge->getUUID()); if(item) { - LLPreview::hide(item->getUUID()); - } - } - // - for(i = 0; i < count; ++i) - { - bridge = (LLInvFVBridge*)(batch.get(i)); - if(!bridge || !bridge->isItemRemovable()) continue; - item = (LLViewerInventoryItem*)model->getItem(bridge->getUUID()); - if(item) - { if(item->getParentUUID() == trash_id) continue; move_ids.push_back(item->getUUID()); - // don't do stuff that messes with gMessageSystem - //LLPreview::hide(item->getUUID()); - // + // don't do stuff that messes with gMessageSystem + //LLPreview::hide(item->getUUID()); + // --update[item->getParentUUID()]; ++update[trash_id]; - // - if(!gInventory.isObjectDescendentOf(item->getUUID(), gLocalInventoryRoot)) - { - // + // + if(!gInventory.isObjectDescendentOf(item->getUUID(), gLocalInventoryRoot)) + { + // if(start_new_message) { start_new_message = false; @@ -371,9 +371,9 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray - } - // + // + } + // } } if(!start_new_message) @@ -394,10 +394,10 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArraygetUUID()); --update[cat->getParentUUID()]; ++update[trash_id]; - // - if(!gInventory.isObjectDescendentOf(cat->getUUID(), gLocalInventoryRoot)) - { - // + // + if(!gInventory.isObjectDescendentOf(cat->getUUID(), gLocalInventoryRoot)) + { + // if(start_new_message) { start_new_message = false; @@ -417,9 +417,9 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray - } - // + // + } + // } } if(!start_new_message) @@ -433,37 +433,37 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray::iterator end = move_ids.end(); for(; it != end; ++it) { - // trash problem - if(gInventory.isObjectDescendentOf(*it, gLocalInventoryRoot)) - { - // 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 - // + // trash problem + if(gInventory.isObjectDescendentOf(*it, gLocalInventoryRoot)) + { + // 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); } @@ -473,13 +473,13 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return FALSE; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return FALSE; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return FALSE; BOOL is_agent_inventory = model->isObjectDescendentOf(mUUID, gAgent.getInventoryRootID()); @@ -550,22 +550,22 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, std::vector - /* - // + // + /* + // if ( (! ( isItemPermissive() || gAgent.isGodlike() ) ) || (flags & FIRST_SELECTED_ITEM) == 0) { disabled_items.push_back(std::string("Copy Asset UUID")); } - // - */ - // + // + */ + // } - // - //items.push_back(std::string("Magic Get")); - //items.push_back(std::string("Rez")); + // + //items.push_back(std::string("Magic Get")); + //items.push_back(std::string("Rez")); items.push_back(std::string("Open With...")); items.push_back(std::string("Copy Separator")); @@ -647,13 +647,13 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const LLInventoryObject* LLInvFVBridge::getInventoryObject() const { - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return NULL; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return NULL; + } + // LLInventoryObject* obj = NULL; LLInventoryModel* model = mInventoryPanel->getModel(); if(model) @@ -665,13 +665,13 @@ LLInventoryObject* LLInvFVBridge::getInventoryObject() const BOOL LLInvFVBridge::isInTrash() const { - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return FALSE; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return FALSE; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return FALSE; LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH); @@ -680,13 +680,13 @@ BOOL LLInvFVBridge::isInTrash() const BOOL LLInvFVBridge::isAgentInventory() const { - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return FALSE; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return FALSE; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return FALSE; if(gAgent.getInventoryRootID() == mUUID) return TRUE; @@ -704,9 +704,9 @@ void LLInvFVBridge::changeItemParent(LLInventoryModel* model, const LLUUID& new_parent, BOOL restamp) { - // - bool send_parent_update = gInventory.isObjectDescendentOf(item->getUUID(), gAgent.getInventoryRootID()); - // + // + bool send_parent_update = gInventory.isObjectDescendentOf(item->getUUID(), gAgent.getInventoryRootID()); + // if(item->getParentUUID() != new_parent) { LLInventoryModel::update_list_t update; @@ -718,9 +718,9 @@ void LLInvFVBridge::changeItemParent(LLInventoryModel* model, LLPointer new_item = new LLViewerInventoryItem(item); new_item->setParent(new_parent); - // - if(send_parent_update) - // + // + if(send_parent_update) + // new_item->updateParentOnServer(restamp); model->updateItem(new_item); model->notifyObservers(); @@ -969,22 +969,22 @@ void LLItemBridge::selectItem() LLViewerInventoryItem* item = (LLViewerInventoryItem*)getItem(); if(item && !item->isComplete()) { - // - if(!(gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot))) - // + // + if(!(gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot))) + // item->fetchFromServer(); } } void LLItemBridge::restoreItem() { - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return; + } + // LLViewerInventoryItem* item = (LLViewerInventoryItem*)getItem(); if(item) { @@ -1088,11 +1088,11 @@ std::string LLItemBridge::getLabelSuffix() const if(item) { // it's a bit confusing to put nocopy/nomod/etc on calling cards. - // Not really sheesh - //if(LLAssetType::AT_CALLINGCARD != item->getType() - // && item->getPermissions().getOwner() == gAgent.getID()) - if(item->getPermissions().getOwner() == gAgent.getID()) - // + // Not really sheesh + //if(LLAssetType::AT_CALLINGCARD != item->getType() + // && item->getPermissions().getOwner() == gAgent.getID()) + if(item->getPermissions().getOwner() == gAgent.getID()) + // { BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID()); BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID()); @@ -1143,13 +1143,13 @@ BOOL LLItemBridge::renameItem(const std::string& new_name) { if(!isItemRenameable()) return FALSE; LLPreview::rename(mUUID, getPrefix() + new_name); - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return FALSE; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return FALSE; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return FALSE; LLViewerInventoryItem* item = getItem(); @@ -1176,13 +1176,13 @@ BOOL LLItemBridge::removeItem() } // move it to the trash LLPreview::hide(mUUID, TRUE); - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return FALSE; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return FALSE; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return FALSE; LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH); @@ -1191,16 +1191,16 @@ BOOL LLItemBridge::removeItem() // if item is not already in trash if(item && !model->isObjectDescendentOf(mUUID, trash_id)) { - // trash problem - if(gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot)) - { - LLInventoryModel::LLCategoryUpdate up(item->getParentUUID(), -1); - gInventory.deleteObject(mUUID); - gInventory.accountForUpdate(up); - gInventory.notifyObservers(); - } - else - // + // trash problem + if(gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot)) + { + LLInventoryModel::LLCategoryUpdate up(item->getParentUUID(), -1); + gInventory.deleteObject(mUUID); + gInventory.accountForUpdate(up); + gInventory.notifyObservers(); + } + else + // // move to trash, and restamp LLInvFVBridge::changeItemParent(model, item, trash_id, TRUE); // delete was successful @@ -1234,13 +1234,13 @@ BOOL LLItemBridge::copyToClipboard() const LLViewerInventoryItem* LLItemBridge::getItem() const { - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return NULL; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return NULL; + } + // LLViewerInventoryItem* item = NULL; LLInventoryModel* model = mInventoryPanel->getModel(); if(model) @@ -1289,27 +1289,27 @@ void LLFolderBridge::selectItem() // Can be destroyed (or moved to trash) BOOL LLFolderBridge::isItemRemovable() { - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return FALSE; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return FALSE; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) { return FALSE; } - // - // People delete their inventory easily... - if(mUUID == gAgent.getInventoryRootID()) - { - return FALSE; - } - /* - // + // + // People delete their inventory easily... + if(mUUID == gAgent.getInventoryRootID()) + { + return FALSE; + } + /* + // if(!model->isObjectDescendentOf(mUUID, gAgent.getInventoryRootID())) { return FALSE; @@ -1366,22 +1366,22 @@ BOOL LLFolderBridge::isItemRemovable() } } } - // - */ - // + // + */ + // return TRUE; } BOOL LLFolderBridge::isUpToDate() const { - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return FALSE; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return FALSE; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return FALSE; LLViewerInventoryCategory* category = (LLViewerInventoryCategory*)model->getCategory(mUUID); @@ -1390,10 +1390,10 @@ BOOL LLFolderBridge::isUpToDate() const return FALSE; } - // trying to make it stop trying to fetch Local Inventory - //return category->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN; - return (category->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN) || (mUUID == gLocalInventoryRoot) || (gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot)); - // + // trying to make it stop trying to fetch Local Inventory + //return category->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN; + return (category->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN) || (mUUID == gLocalInventoryRoot) || (gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot)); + // } BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, @@ -1403,13 +1403,13 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, // the UI will get confused and pass in a NULL. if(!inv_cat) return FALSE; - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return FALSE; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return FALSE; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return FALSE; @@ -1859,13 +1859,13 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model } else if ("removefromoutfit" == action) { - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return; LLViewerInventoryCategory* cat = getCategory(); @@ -1897,13 +1897,13 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model void LLFolderBridge::openItem() { lldebugs << "LLFolderBridge::openItem()" << llendl; - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return; model->fetchDescendentsOf(mUUID); @@ -1922,6 +1922,13 @@ BOOL LLFolderBridge::isItemRenameable() const void LLFolderBridge::restoreItem() { + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return; + } + // LLViewerInventoryCategory* cat; cat = (LLViewerInventoryCategory*)getCategory(); if(cat) @@ -2000,13 +2007,13 @@ LLUIImagePtr LLFolderBridge::getIcon() const BOOL LLFolderBridge::renameItem(const std::string& new_name) { - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return FALSE; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return FALSE; + } + // if(!isItemRenameable()) return FALSE; LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return FALSE; @@ -2026,21 +2033,21 @@ BOOL LLFolderBridge::renameItem(const std::string& new_name) BOOL LLFolderBridge::removeItem() { - // - //if(!isItemRemovable()) - //{ - // return FALSE; - //} - // + // + //if(!isItemRemovable()) + //{ + // return FALSE; + //} + // // move it to the trash LLPreview::hide(mUUID); - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return FALSE; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return FALSE; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return FALSE; @@ -2068,41 +2075,41 @@ BOOL LLFolderBridge::removeItem() LLViewerInventoryCategory* cat = getCategory(); if(cat) { - // trash problem - if(gInventory.isObjectDescendentOf(cat->getUUID(), gLocalInventoryRoot)) - { - S32 descendents = cat->getDescendentCount(); - if(descendents > 0) - { - LLInventoryModel::LLCategoryUpdate up(cat->getUUID(), -descendents); - gInventory.accountForUpdate(up); - } - 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()); - } - - LLInventoryModel::LLCategoryUpdate up(cat->getParentUUID(), -descendents); - gInventory.deleteObject(cat->getUUID()); - gInventory.accountForUpdate(up); - gInventory.notifyObservers(); - } - else - // + // trash problem + if(gInventory.isObjectDescendentOf(cat->getUUID(), gLocalInventoryRoot)) + { + S32 descendents = cat->getDescendentCount(); + if(descendents > 0) + { + LLInventoryModel::LLCategoryUpdate up(cat->getUUID(), -descendents); + gInventory.accountForUpdate(up); + } + 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()); + } + + LLInventoryModel::LLCategoryUpdate up(cat->getParentUUID(), -descendents); + gInventory.deleteObject(cat->getUUID()); + gInventory.accountForUpdate(up); + gInventory.notifyObservers(); + } + else + // LLInvFVBridge::changeCategoryParent(model, cat, trash_id, TRUE); } @@ -2120,13 +2127,13 @@ BOOL LLFolderBridge::isClipboardPasteable() const void LLFolderBridge::pasteFromClipboard() { - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(model && isClipboardPasteable()) { @@ -2164,13 +2171,13 @@ void LLFolderBridge::folderOptionsMenu() // *TODO: Translate - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return; @@ -2208,8 +2215,15 @@ void LLFolderBridge::folderOptionsMenu() // Only enable add/replace outfit for non-default folders. if (!is_default_folder) { - mItems.push_back(std::string("Add To Outfit")); - mItems.push_back(std::string("Replace Outfit")); + // don't allow attaching stuff during attachment import + if(!(LLXmlImport::sImportInProgress && LLXmlImport::sImportHasAttachments)) + { + // + mItems.push_back(std::string("Add To Outfit")); + mItems.push_back(std::string("Replace Outfit")); + // + } + // } mItems.push_back(std::string("Take Off Items")); } @@ -2234,14 +2248,13 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) // *TODO: Translate lldebugs << "LLFolderBridge::buildContextMenu()" << llendl; // std::vector disabled_items; -// std::vector disabled_items; - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return; LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH); @@ -2349,18 +2362,25 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { - // - //mItems.push_back(std::string("--no options--")); - //mDisabledItems.push_back(std::string("--no options--")); - mItems.push_back(std::string("Save As...")); - mItems.push_back(std::string("Save InvCache...")); - // + // + //mItems.push_back(std::string("--no options--")); + //mDisabledItems.push_back(std::string("--no options--")); + mItems.push_back(std::string("Save As...")); + mItems.push_back(std::string("Save InvCache...")); + // } hideContextEntries(menu, mItems, mDisabledItems); } BOOL LLFolderBridge::hasChildren() const { + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return FALSE; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return FALSE; LLInventoryModel::EHasChildren has_children; @@ -2401,14 +2421,14 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, } LLViewerInventoryCategory* LLFolderBridge::getCategory() const -{ - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return NULL; - } - // +{ + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return NULL; + } + // LLViewerInventoryCategory* cat = NULL; LLInventoryModel* model = mInventoryPanel->getModel(); if(model) @@ -2430,6 +2450,13 @@ void LLFolderBridge::createNewCategory(void* user_data) { LLFolderBridge* bridge = (LLFolderBridge*)user_data; if(!bridge) return; + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), bridge->mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return; + } + // LLInventoryPanel* panel = bridge->mInventoryPanel; LLInventoryModel* model = panel->getModel(); if(!model) return; @@ -2533,14 +2560,14 @@ void LLFolderBridge::createWearable(LLUUID parent_id, EWearableType type) } void LLFolderBridge::modifyOutfit(BOOL append) -{ - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return; - } - // +{ + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return; LLViewerInventoryCategory* cat = getCategory(); @@ -2591,14 +2618,14 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop) -{ - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return FALSE; - } - // +{ + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return FALSE; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return FALSE; @@ -3087,14 +3114,14 @@ LLCallingCardBridge::~LLCallingCardBridge() } void LLCallingCardBridge::refreshFolderViewItem() -{ - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return; - } - // +{ + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return; + } + // LLFolderViewItem* itemp = mInventoryPanel->getRootFolder()->getItemByID(mUUID); if (itemp) { @@ -3601,12 +3628,12 @@ std::string LLObjectBridge::sPrefix("Object: "); LLUUID LLObjectBridge::sContextMenuItemID; BOOL LLObjectBridge::isItemRemovable() -{ - // - //LLVOAvatar* avatar = gAgent.getAvatarObject(); - //if(!avatar) return FALSE; - //if(avatar->isWearingAttachment(mUUID)) return FALSE; - // +{ + // + //LLVOAvatar* avatar = gAgent.getAvatarObject(); + //if(!avatar) return FALSE; + //if(avatar->isWearingAttachment(mUUID)) return FALSE; + // return LLInvFVBridge::isItemRemovable(); } @@ -3715,18 +3742,18 @@ std::string LLObjectBridge::getLabelSuffix() const LLStringUtil::toLower(attachment_point_name); return LLItemBridge::getLabelSuffix() + std::string(" (worn on ") + attachment_point_name + std::string(")"); } - else - { - // testzone attachpt - if(avatar) - { - std::map::iterator iter = avatar->mUnsupportedAttachmentPoints.begin(); - std::map::iterator end = avatar->mUnsupportedAttachmentPoints.end(); - for( ; iter != end; ++iter) - if((*iter).second == mUUID) - return LLItemBridge::getLabelSuffix() + llformat(" (worn on unsupported point %d)", (*iter).first); - } - // + else + { + // testzone attachpt + if(avatar) + { + std::map::iterator iter = avatar->mUnsupportedAttachmentPoints.begin(); + std::map::iterator end = avatar->mUnsupportedAttachmentPoints.end(); + for( ; iter != end; ++iter) + if((*iter).second == mUUID) + return LLItemBridge::getLabelSuffix() + llformat(" (worn on unsupported point %d)", (*iter).first); + } + // return LLItemBridge::getLabelSuffix(); } } @@ -3825,19 +3852,19 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) if( avatarp->isWearingAttachment( mUUID ) ) { items.push_back(std::string("Detach From Yourself")); - } - else - // testzone attachpt - if( avatarp->isWearingUnsupportedAttachment( mUUID ) ) - { - items.push_back(std::string("Detach From Yourself")); - } - else - // - // don't allow attaching objects while importing attachments - //if( !isInTrash() ) - if( !isInTrash() && !(LLXmlImport::sImportInProgress && LLXmlImport::sImportHasAttachments)) - // + } + else + // testzone attachpt + if( avatarp->isWearingUnsupportedAttachment( mUUID ) ) + { + items.push_back(std::string("Detach From Yourself")); + } + else + // + // don't allow attaching objects while importing attachments + //if( !isInTrash() ) + if( !isInTrash() && !(LLXmlImport::sImportInProgress && LLXmlImport::sImportHasAttachments)) + // { items.push_back(std::string("Attach Separator")); items.push_back(std::string("Object Wear")); @@ -3872,40 +3899,38 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) NULL, &attach_label, (void*)attachment)); } - } - - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - } - else - { - // - LLSimpleListener* callback = mInventoryPanel->getListenerByName("Inventory.AttachObject"); - - if (callback) + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) { - new_item->addListener(callback, "on_click", LLSD(attachment->getName())); + llwarns << "scheduled for delayed delete" << llendl; } - // derf + else + { + // + LLSimpleListener* callback = mInventoryPanel->getListenerByName("Inventory.AttachObject"); + + if (callback) + { + new_item->addListener(callback, "on_click", LLSD(attachment->getName())); + } + // derf + } + // } - // - } - // - LLMenuItemCallGL *new_item = new LLMenuItemCallGL("Custom...", NULL, NULL); - attach_menu->append(new_item); - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - } - else - { - LLSimpleListener* callback = mInventoryPanel->getListenerByName("Inventory.AttachCustom"); - new_item->addListener(callback, "on_click", NULL); + // + LLMenuItemCallGL *new_item = new LLMenuItemCallGL("Custom...", NULL, NULL); + attach_menu->append(new_item); + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + } + else + { + LLSimpleListener* callback = mInventoryPanel->getListenerByName("Inventory.AttachCustom"); + new_item->addListener(callback, "on_click", NULL); + } + // } - // - } } } } @@ -3916,13 +3941,13 @@ BOOL LLObjectBridge::renameItem(const std::string& new_name) { if(!isItemRenameable()) return FALSE; LLPreview::rename(mUUID, getPrefix() + new_name); - // derf - if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) - { - llwarns << "scheduled for delayed delete" << llendl; - return FALSE; - } - // + // derf + if(std::find(LLInventoryPanel::sInstances.begin(), LLInventoryPanel::sInstances.end(), mInventoryPanel) == LLInventoryPanel::sInstances.end()) + { + llwarns << "scheduled for delayed delete" << llendl; + return FALSE; + } + // LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return FALSE; LLViewerInventoryItem* item = getItem(); @@ -4723,8 +4748,8 @@ BOOL LLWearableBridge::renameItem(const std::string& new_name) BOOL LLWearableBridge::isItemRemovable() { - // - //if(gAgent.isWearingItem(mUUID)) return FALSE; + // + //if(gAgent.isWearingItem(mUUID)) return FALSE; // return LLInvFVBridge::isItemRemovable(); } @@ -4895,6 +4920,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) (void*)this));*/ } } + hideContextEntries(menu, items, disabled_items); } diff --git a/indra/newview/llinventoryview.cpp b/indra/newview/llinventoryview.cpp index 82691653d..4b2233683 100644 --- a/indra/newview/llinventoryview.cpp +++ b/indra/newview/llinventoryview.cpp @@ -1622,6 +1622,9 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) if (itemp) { + // + itemp->mDelayedDelete = TRUE; + // if (parent_folder) { itemp->addToFolder(parent_folder, mFolders); diff --git a/indra/newview/llinventoryview.h b/indra/newview/llinventoryview.h index a6f39dbb1..ea015d52d 100644 --- a/indra/newview/llinventoryview.h +++ b/indra/newview/llinventoryview.h @@ -79,9 +79,10 @@ public: BOOL allow_multi_select, LLView *parent_view = NULL); ~LLInventoryPanel(); - // - static std::list sInstances; - // + + // + static std::list sInstances; + // LLInventoryModel* getModel() { return mInventory; } @@ -141,9 +142,9 @@ protected: // Given the id and the parent, build all of the folder views. void rebuildViewsFor(const LLUUID& id, U32 mask); void buildNewViews(const LLUUID& id); - // - void buildNewViews(const LLInventoryObject* objectp); - // + // + void buildNewViews(const LLInventoryObject* objectp); + // public: // TomY TODO: Move this elsewhere?