From 5861a2faf2b5e5bf88bc5732e6a77406e3fcbaef Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 30 Mar 2010 11:49:15 -0400 Subject: EXT-3414 : Move static backgroundfetch methods and variables to llinventorymodel subclass Created LLInventoryModelBackgroundFetch file for handling background fetch. --- indra/newview/llinventorybridge.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index efd23c36ca..899a70303b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -52,6 +52,7 @@ #include "llinventoryclipboard.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" +#include "llinventorymodelbackgroundfetch.h" #include "llinventorypanel.h" #include "llnotifications.h" #include "llnotificationsutil.h" @@ -729,7 +730,7 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const if (*type == DAD_CATEGORY) { - gInventory.startBackgroundFetch(obj->getUUID()); + LLInventoryModelBackgroundFetch::instance().start(obj->getUUID()); } rv = TRUE; -- cgit v1.2.3 From dbcd12a4d14412de6850fbf89dfe58b1f799222d Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Tue, 30 Mar 2010 15:17:14 -0400 Subject: EXT-6633 enable basic multiwearables demo Fixed several areas of code that were not multi-wearables enabled. Specifically allowed for the wearing of created outfits that had links to multiple items of the same type. Such outfits can be created by dragging multiple items of the same type into an unworn outfit folder. When you wear the outfit, all items (up to 5 per type) should be worn. Does not affect right-click options or other buttons. Code reviewed by Vir. --- indra/newview/llinventorybridge.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ceeffea1c9..b42c14c840 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4958,9 +4958,9 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES ) ) //&& //!((!gAgent.isTeen()) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) ) { - // MULTI_WEARABLE: FIXME HACK - always remove all bool do_remove_all = false; - gAgentWearables.removeWearable( type, do_remove_all, 0 ); + U32 index = gAgentWearables.getWearableIndex(wearable); + gAgentWearables.removeWearable( type, do_remove_all, index ); } } } -- cgit v1.2.3 From d7002c0695927f2135e86a837d4472886ea42eb6 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 30 Mar 2010 16:24:18 -0400 Subject: EXT-3529 : INFRASTRUCTURE : Move LLFindWearables code and others into LLInventoryFunctions These functions are defined in LLInventoryFunctions.h but their implementation is in LLInventoryBridge... moved everything to LLInventoryFunctions. --- indra/newview/llinventorybridge.cpp | 48 +++---------------------------------- 1 file changed, 3 insertions(+), 45 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 899a70303b..e7c51aa2a8 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -31,10 +31,12 @@ */ #include "llviewerprecompiledheaders.h" +#include "llinventorybridge.h" + // external projects #include "lltransfersourceasset.h" -#include "llinventorybridge.h" + #include "llagent.h" #include "llagentcamera.h" @@ -1923,50 +1925,6 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, return accept; } -bool LLFindCOFValidItems::operator()(LLInventoryCategory* cat, - LLInventoryItem* item) -{ - // Valid COF items are: - // - links to wearables (body parts or clothing) - // - links to attachments - // - links to gestures - // - links to ensemble folders - LLViewerInventoryItem *linked_item = ((LLViewerInventoryItem*)item)->getLinkedItem(); - if (linked_item) - { - LLAssetType::EType type = linked_item->getType(); - return (type == LLAssetType::AT_CLOTHING || - type == LLAssetType::AT_BODYPART || - type == LLAssetType::AT_GESTURE || - type == LLAssetType::AT_OBJECT); - } - else - { - LLViewerInventoryCategory *linked_category = ((LLViewerInventoryItem*)item)->getLinkedCategory(); - // BAP remove AT_NONE support after ensembles are fully working? - return (linked_category && - ((linked_category->getPreferredType() == LLFolderType::FT_NONE) || - (LLFolderType::lookupIsEnsembleType(linked_category->getPreferredType())))); - } -} - - -bool LLFindWearables::operator()(LLInventoryCategory* cat, - LLInventoryItem* item) -{ - if(item) - { - if((item->getType() == LLAssetType::AT_CLOTHING) - || (item->getType() == LLAssetType::AT_BODYPART)) - { - return TRUE; - } - } - return FALSE; -} - - - //Used by LLFolderBridge as callback for directory recursion. class LLRightClickInventoryFetchObserver : public LLInventoryFetchObserver { -- cgit v1.2.3