aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorArmin Weatherwax2012-01-10 22:39:31 +0100
committerArmin Weatherwax2012-01-10 22:39:31 +0100
commit56a7ba61f631924e36c779f7efcabfd755c4beb2 (patch)
treee3e2f726fc4969069cca2c23785b25597dce9996 /linden/indra/newview/llinventorybridge.cpp
parentdisable voice if ParcelVoiceInfoRequest response is malformed. (diff)
downloadmeta-impy-56a7ba61f631924e36c779f7efcabfd755c4beb2.zip
meta-impy-56a7ba61f631924e36c779f7efcabfd755c4beb2.tar.gz
meta-impy-56a7ba61f631924e36c779f7efcabfd755c4beb2.tar.bz2
meta-impy-56a7ba61f631924e36c779f7efcabfd755c4beb2.tar.xz
New inventory categrory capability code - needs testing.
* Original code from: https://bitbucket.org/lindenlab/viewer-development/changeset/d327dcc8ae51 * Port by Henri Beauchamp: https://lists.secondlife.com/pipermail/opensource-dev/2012-January/008544.html * 3 Lines of debug by /me (find the Hippos -remove after testing)
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llinventorybridge.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index f71df2d..bd08773 100644
--- a/linden/indra/newview/llinventorybridge.cpp
+++ b/linden/indra/newview/llinventorybridge.cpp
@@ -1610,18 +1610,21 @@ void LLRightClickInventoryFetchDescendentsObserver::done()
1610class LLInventoryCopyAndWearObserver : public LLInventoryObserver 1610class LLInventoryCopyAndWearObserver : public LLInventoryObserver
1611{ 1611{
1612public: 1612public:
1613 LLInventoryCopyAndWearObserver(const LLUUID& cat_id, int count) :mCatID(cat_id), mContentsCount(count), mFolderAdded(FALSE) {} 1613 LLInventoryCopyAndWearObserver(const LLUUID& cat_id,
1614 int count,
1615 bool folder_added = false)
1616 : mCatID(cat_id),
1617 mContentsCount(count),
1618 mFolderAdded(FALSE) {}
1614 virtual ~LLInventoryCopyAndWearObserver() {} 1619 virtual ~LLInventoryCopyAndWearObserver() {}
1615 virtual void changed(U32 mask); 1620 virtual void changed(U32 mask);
1616 1621
1617protected: 1622protected:
1618 LLUUID mCatID; 1623 LLUUID mCatID;
1619 int mContentsCount; 1624 int mContentsCount;
1620 BOOL mFolderAdded; 1625 bool mFolderAdded;
1621}; 1626};
1622 1627
1623
1624
1625void LLInventoryCopyAndWearObserver::changed(U32 mask) 1628void LLInventoryCopyAndWearObserver::changed(U32 mask)
1626{ 1629{
1627 if((mask & (LLInventoryObserver::ADD)) != 0) 1630 if((mask & (LLInventoryObserver::ADD)) != 0)
@@ -2331,13 +2334,16 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response
2331 2334
2332 if(option == 0 && object) 2335 if(option == 0 && object)
2333 { 2336 {
2334 if (cat_and_wear && cat_and_wear->mWear) 2337 if (cat_and_wear && cat_and_wear->mWear) // && !cat_and_wear->mFolderResponded)
2335 { 2338 {
2336 InventoryObjectList inventory_objects; 2339 InventoryObjectList inventory_objects;
2337 object->getInventoryContents(inventory_objects); 2340 object->getInventoryContents(inventory_objects);
2338 int contents_count = inventory_objects.size()-1; //subtract one for containing folder 2341 int contents_count = inventory_objects.size()-1; //subtract one for containing folder
2339 2342
2340 LLInventoryCopyAndWearObserver* inventoryObserver = new LLInventoryCopyAndWearObserver(cat_and_wear->mCatID, contents_count); 2343 LLInventoryCopyAndWearObserver* inventoryObserver;
2344 inventoryObserver = new LLInventoryCopyAndWearObserver(cat_and_wear->mCatID,
2345 contents_count,
2346 cat_and_wear->mFolderResponded);
2341 gInventory.addObserver(inventoryObserver); 2347 gInventory.addObserver(inventoryObserver);
2342 } 2348 }
2343 2349