From cdbdb1168694bcbfc58208f2941f513b556a0d6e Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 6 Apr 2010 14:47:20 -0400 Subject: EXT-4151 : Immediately check if a fetchObserver filter is done, else add to observer list automatically FetchObservers now take in a list of IDs to check against. Made some naming changes. --- indra/newview/llappearancemgr.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'indra/newview/llappearancemgr.h') diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 40b8844731..1cf8d584db 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -244,10 +244,12 @@ void doOnIdleRepeating(T callable) } template -class CallAfterCategoryFetchStage2: public LLInventoryFetchObserver +class CallAfterCategoryFetchStage2: public LLInventoryFetchItemsObserver { public: - CallAfterCategoryFetchStage2(T callable): + CallAfterCategoryFetchStage2(const uuid_vec_t& ids, + T callable) : + LLInventoryFetchItemsObserver(ids), mCallable(callable) { } @@ -268,7 +270,8 @@ template class CallAfterCategoryFetchStage1: public LLInventoryFetchDescendentsObserver { public: - CallAfterCategoryFetchStage1(T callable): + CallAfterCategoryFetchStage1(const uuid_vec_t& ids, T callable) : + LLInventoryFetchDescendentsObserver(ids), mCallable(callable) { } @@ -297,7 +300,6 @@ public: return; } - CallAfterCategoryFetchStage2 *stage2 = new CallAfterCategoryFetchStage2(mCallable); uuid_vec_t ids; for(S32 i = 0; i < count; ++i) { @@ -307,7 +309,8 @@ public: gInventory.removeObserver(this); // do the fetch - stage2->fetch(ids); + CallAfterCategoryFetchStage2 *stage2 = new CallAfterCategoryFetchStage2(ids, mCallable); + stage2->startFetch(); if(stage2->isEverythingComplete()) { // everything is already here - call done. @@ -328,10 +331,10 @@ protected: template void callAfterCategoryFetch(const LLUUID& cat_id, T callable) { - CallAfterCategoryFetchStage1 *stage1 = new CallAfterCategoryFetchStage1(callable); uuid_vec_t folders; folders.push_back(cat_id); - stage1->fetch(folders); + CallAfterCategoryFetchStage1 *stage1 = new CallAfterCategoryFetchStage1(folders, callable); + stage1->startFetch(); if (stage1->isEverythingComplete()) { stage1->done(); -- cgit v1.2.3 From c3d9316dff568d5265d856a708e3909deae09f18 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 6 Apr 2010 17:30:23 -0400 Subject: EXT-6727 : Allow LLInventoryObservers to target a single item (instead of a vector of items) Added new constructors to LLInventoryFetch types to allow passing in a single item. --- indra/newview/llappearancemgr.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'indra/newview/llappearancemgr.h') diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 1cf8d584db..27a4ffd8cb 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -270,8 +270,8 @@ template class CallAfterCategoryFetchStage1: public LLInventoryFetchDescendentsObserver { public: - CallAfterCategoryFetchStage1(const uuid_vec_t& ids, T callable) : - LLInventoryFetchDescendentsObserver(ids), + CallAfterCategoryFetchStage1(const LLUUID& cat_id, T callable) : + LLInventoryFetchDescendentsObserver(cat_id), mCallable(callable) { } @@ -331,9 +331,7 @@ protected: template void callAfterCategoryFetch(const LLUUID& cat_id, T callable) { - uuid_vec_t folders; - folders.push_back(cat_id); - CallAfterCategoryFetchStage1 *stage1 = new CallAfterCategoryFetchStage1(folders, callable); + CallAfterCategoryFetchStage1 *stage1 = new CallAfterCategoryFetchStage1(cat_id, callable); stage1->startFetch(); if (stage1->isEverythingComplete()) { -- cgit v1.2.3 From f096f02278f3b8c8fdd962c85b237492defa93ec Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 6 Apr 2010 18:58:26 -0400 Subject: EXT-6728 : Have LLInventoryFetchItems/DescendentsObserver inherit from a base abstract LLInventoryFetchObserver class Added a new abstract class LLInventoryFetchObserver from which LLInventoryFetchItems and LLInventoryFetchDescendents inherit. Also changed isEverythingComplete to isFinished and made some other minor superficial changes. --- indra/newview/llappearancemgr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappearancemgr.h') diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 27a4ffd8cb..93b3cecb6f 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -311,7 +311,7 @@ public: // do the fetch CallAfterCategoryFetchStage2 *stage2 = new CallAfterCategoryFetchStage2(ids, mCallable); stage2->startFetch(); - if(stage2->isEverythingComplete()) + if(stage2->isFinished()) { // everything is already here - call done. stage2->done(); @@ -333,7 +333,7 @@ void callAfterCategoryFetch(const LLUUID& cat_id, T callable) { CallAfterCategoryFetchStage1 *stage1 = new CallAfterCategoryFetchStage1(cat_id, callable); stage1->startFetch(); - if (stage1->isEverythingComplete()) + if (stage1->isFinished()) { stage1->done(); } -- cgit v1.2.3 From 9d93441b3117c59652fbb81abea2983f3cbca203 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 9 Apr 2010 12:30:33 +0300 Subject: done EXT-6687 Implement Save button functionality (Edit Outfit panel) Implemented "Save", "Save as new" functionality. If the base outfit doesn't exist "Save as new" functionality is employed Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/179 --HG-- branch : product-engine --- indra/newview/llappearancemgr.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llappearancemgr.h') diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 423d9bde69..c7a8bc3720 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -75,6 +75,9 @@ public: const LLViewerInventoryItem *getBaseOutfitLink(); bool getBaseOutfitName(std::string &name); + // find the UUID of the currently worn outfit (Base Outfit) + const LLUUID getBaseOutfitUUID(); + // Update the displayed outfit name in UI. void updatePanelOutfitName(const std::string& name); @@ -123,6 +126,10 @@ public: // Create initial outfits from library. void autopopulateOutfits(); + // Overrides the base outfit with the content from COF + // @return false if there is no base outfit + bool updateBaseOutfit(); + protected: LLAppearanceMgr(); ~LLAppearanceMgr(); -- cgit v1.2.3 From 43c85b0dfb4e7e7c9fdfc02954bbb0115ec344c4 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 9 Apr 2010 15:07:42 +0300 Subject: done EXT-6716 Implement Add button functionality for adding a wearable to Current Outfit (Edit Outfit panel) Added temporary PLUS button on the button bar under the top list of Edit Outfit panel Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/203/ --HG-- branch : product-engine --- indra/newview/llappearancemgr.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llappearancemgr.h') diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index f0374048c6..befad591bd 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -78,6 +78,9 @@ public: // find the UUID of the currently worn outfit (Base Outfit) const LLUUID getBaseOutfitUUID(); + // Wear/attach an item (from a user's inventory) on the agent + bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_to_wear, bool do_update = true); + // Update the displayed outfit name in UI. void updatePanelOutfitName(const std::string& name); -- cgit v1.2.3 From cf31494b5053283b4d445b0c564b5e7d57af2a18 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 9 Apr 2010 15:19:11 +0300 Subject: done EXT-6688 Implement Revert button funtionality (Edit Outfit panel) On revert the base outfit is worn Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/205/ --HG-- branch : product-engine --- indra/newview/llappearancemgr.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llappearancemgr.h') diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index befad591bd..d67a7787d3 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -129,6 +129,8 @@ public: // Create initial outfits from library. void autopopulateOutfits(); + void wearBaseOutfit(); + // Overrides the base outfit with the content from COF // @return false if there is no base outfit bool updateBaseOutfit(); -- cgit v1.2.3 From 51da51894cef9bf606d2117584e24679a1768813 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Fri, 9 Apr 2010 20:14:30 +0300 Subject: No ticket. Fixed Linux build. --HG-- branch : product-engine --- indra/newview/llappearancemgr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappearancemgr.h') diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index d67a7787d3..dffd421898 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -79,7 +79,7 @@ public: const LLUUID getBaseOutfitUUID(); // Wear/attach an item (from a user's inventory) on the agent - bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_to_wear, bool do_update = true); + bool wearItemOnAvatar(const LLUUID& item_to_wear, bool do_update = true); // Update the displayed outfit name in UI. void updatePanelOutfitName(const std::string& name); -- cgit v1.2.3 From 613b4e9361df55da3863a546c806493d48f848f3 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Tue, 13 Apr 2010 13:37:14 +0300 Subject: done EXT-6675 Fix TRASH btn on Edit Outfit panel to remove an item from avatar (from COF) Trash button removes from avatar a selected item only of "clothing" and "object" types Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/209/ --HG-- branch : product-engine --- indra/newview/llappearancemgr.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llappearancemgr.h') diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index dffd421898..83261bbbd0 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -135,6 +135,9 @@ public: // @return false if there is no base outfit bool updateBaseOutfit(); + //Remove clothing or detach an object from the agent (a bodypart cannot be removed) + void removeItemFromAvatar(const LLUUID& item_id); + protected: LLAppearanceMgr(); ~LLAppearanceMgr(); -- cgit v1.2.3