diff options
author | Aura Linden <aura@lindenlab.com> | 2016-03-31 15:26:53 -0700 |
---|---|---|
committer | Aura Linden <aura@lindenlab.com> | 2016-03-31 15:26:53 -0700 |
commit | 104b117154022da6ec8e54bea04ff76e5692f93a (patch) | |
tree | 24ee31702af5899a5a2bef21abf3d1c69cdf7725 /indra/newview/llinventorymodel.cpp | |
parent | 18928ea6c6f2830a0d45ec412c915eceff1b76b0 (diff) |
Faster to copy changes than merge branches.
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rwxr-xr-x | indra/newview/llinventorymodel.cpp | 153 |
1 files changed, 0 insertions, 153 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index bdbe253723..ea57067f93 100755 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -2693,24 +2693,13 @@ void LLInventoryModel::registerCallbacks(LLMessageSystem* msg) msg->setHandlerFuncFast(_PREHASH_RemoveInventoryObjects, processRemoveInventoryObjects, NULL); - //msg->setHandlerFuncFast(_PREHASH_ExchangeCallingCard, - // processExchangeCallingcard, - // NULL); - //msg->setHandlerFuncFast(_PREHASH_AddCallingCard, - // processAddCallingcard, - // NULL); - //msg->setHandlerFuncFast(_PREHASH_DeclineCallingCard, - // processDeclineCallingcard, - // NULL); msg->setHandlerFuncFast(_PREHASH_SaveAssetIntoInventory, processSaveAssetIntoInventory, NULL); msg->setHandlerFuncFast(_PREHASH_BulkUpdateInventory, processBulkUpdateInventory, NULL); - msg->setHandlerFunc("InventoryDescendents", processInventoryDescendents); msg->setHandlerFunc("MoveInventoryItem", processMoveInventoryItem); - msg->setHandlerFunc("FetchInventoryReply", processFetchInventoryReply); } @@ -2730,14 +2719,6 @@ void LLInventoryModel::processUpdateCreateInventoryItem(LLMessageSystem* msg, vo } -// static -void LLInventoryModel::processFetchInventoryReply(LLMessageSystem* msg, void**) -{ - // no accounting - gInventory.messageUpdateCore(msg, false); -} - - bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account, U32 mask) { //make sure our added inventory observer is active @@ -3180,85 +3161,6 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) InventoryCallbackInfo cbinfo = (*inv_it); gInventoryCallbacks.fire(cbinfo.mCallback, cbinfo.mInvID); } - - //gInventory.validate(); - - // Don't show the inventory. We used to call showAgentInventory here. - //LLFloaterInventory* view = LLFloaterInventory::getActiveInventory(); - //if(view) - //{ - // const BOOL take_keyboard_focus = FALSE; - // view->setSelection(category.getUUID(), take_keyboard_focus ); - // LLView* focus_view = gFocusMgr.getKeyboardFocus(); - // LLFocusMgr::FocusLostCallback callback = gFocusMgr.getFocusCallback(); - // // HACK to open inventory offers that are accepted. This information - // // really needs to flow through the instant messages and inventory - // // transfer/update messages. - // if (LLFloaterInventory::sOpenNextNewItem) - // { - // view->openSelected(); - // LLFloaterInventory::sOpenNextNewItem = FALSE; - // } - // - // // restore keyboard focus - // gFocusMgr.setKeyboardFocus(focus_view); - //} -} - -// static -void LLInventoryModel::processInventoryDescendents(LLMessageSystem* msg,void**) -{ - LLUUID agent_id; - msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); - if(agent_id != gAgent.getID()) - { - LL_WARNS() << "Got a UpdateInventoryItem for the wrong agent." << LL_ENDL; - return; - } - LLUUID parent_id; - msg->getUUID("AgentData", "FolderID", parent_id); - LLUUID owner_id; - msg->getUUID("AgentData", "OwnerID", owner_id); - S32 version; - msg->getS32("AgentData", "Version", version); - S32 descendents; - msg->getS32("AgentData", "Descendents", descendents); - - S32 i; - S32 count = msg->getNumberOfBlocksFast(_PREHASH_FolderData); - LLPointer<LLViewerInventoryCategory> tcategory = new LLViewerInventoryCategory(owner_id); - for(i = 0; i < count; ++i) - { - tcategory->unpackMessage(msg, _PREHASH_FolderData, i); - gInventory.updateCategory(tcategory); - } - - count = msg->getNumberOfBlocksFast(_PREHASH_ItemData); - LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem; - for(i = 0; i < count; ++i) - { - titem->unpackMessage(msg, _PREHASH_ItemData, i); - // If the item has already been added (e.g. from link prefetch), then it doesn't need to be re-added. - if (gInventory.getItem(titem->getUUID())) - { - LL_DEBUGS("Inventory") << "Skipping prefetched item [ Name: " << titem->getName() - << " | Type: " << titem->getActualType() << " | ItemUUID: " << titem->getUUID() << " ] " << LL_ENDL; - continue; - } - gInventory.updateItem(titem); - } - - // set version and descendentcount according to message. - LLViewerInventoryCategory* cat = gInventory.getCategory(parent_id); - if(cat) - { - cat->setVersion(version); - cat->setDescendentCount(descendents); - // Get this UUID on the changed list so that whatever's listening for it - // will get triggered. - gInventory.addChangedMask(LLInventoryObserver::INTERNAL, cat->getUUID()); - } - gInventory.notifyObservers(); } // static @@ -3527,30 +3429,6 @@ void LLInventoryModel::updateItemsOrder(LLInventoryModel::item_array_t& items, c } } -//* @param[in] items vector of items in order to be saved. -/* -void LLInventoryModel::saveItemsOrder(const LLInventoryModel::item_array_t& items) -{ - int sortField = 0; - - // current order is saved by setting incremental values (1, 2, 3, ...) for the sort field - for (item_array_t::const_iterator i = items.begin(); i != items.end(); ++i) - { - LLViewerInventoryItem* item = *i; - - item->setSortField(++sortField); - item->setComplete(TRUE); - item->updateServer(FALSE); - - updateItem(item); - - // Tell the parent folder to refresh its sort order. - addChangedMask(LLInventoryObserver::SORT, item->getParentUUID()); - } - - notifyObservers(); -} -*/ // See also LLInventorySort where landmarks in the Favorites folder are sorted. class LLViewerInventoryItemSort { @@ -3561,37 +3439,6 @@ public: } }; -/** - * Sorts passed items by LLViewerInventoryItem sort field. - * - * @param[in, out] items - array of items, not sorted. - */ -//static void rearrange_item_order_by_sort_field(LLInventoryModel::item_array_t& items) -//{ -// static LLViewerInventoryItemSort sort_functor; -// std::sort(items.begin(), items.end(), sort_functor); -//} - -// * @param source_item_id - LLUUID of the source item to be moved into new position -// * @param target_item_id - LLUUID of the target item before which source item should be placed. -/* -void LLInventoryModel::rearrangeFavoriteLandmarks(const LLUUID& source_item_id, const LLUUID& target_item_id) -{ - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - LLIsType is_type(LLAssetType::AT_LANDMARK); - LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); - gInventory.collectDescendentsIf(favorites_id, cats, items, LLInventoryModel::EXCLUDE_TRASH, is_type); - - // ensure items are sorted properly before changing order. EXT-3498 - rearrange_item_order_by_sort_field(items); - - // update order - updateItemsOrder(items, source_item_id, target_item_id); - - saveItemsOrder(items); -} -*/ //---------------------------------------------------------------------------- // *NOTE: DEBUG functionality |