From eb973cf6b21457c12272ddb6213e99d332637116 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 17 Jun 2010 16:51:04 +0300 Subject: EXT-7755 FIXED Updated condition to not show "No Outfit" as a status when outfit is changing. Implementation details: * Added flag to LLAgentWearables to determining that outfit is changing. Synchronizing it with mLoadingStartedSignal and mLoadedSignal signals. * Check this flag when there is no outfit set to show empty title when outfit is being changed. * Also updated condition to disable "Wear" button when outfit is being changed. Additional improvements: * Removed reference to parent LLSidepanelAppearance from the LLPanelOutfitsInventory. * Now LLSidepanelAppearance is subscribed to mLoadingStartedSignal and mLoadedSignal to update its loading indicator. Known Issue: * When new outfit is being worn its name is shown in title for a short moment (loading indicator is shown at this time). Then it is changed with an empty title and is shown when outfit is already worn. If necessary it should be investigated and fixed in scope of another issue. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/593/ --HG-- branch : product-engine --- indra/newview/llagentwearables.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 557b3b0a77..05ed6ec350 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -166,6 +166,7 @@ struct LLAgentDumper LLAgentWearables::LLAgentWearables() : mWearablesLoaded(FALSE) +, mCOFChangeInProgress(false) { } @@ -1208,7 +1209,7 @@ void LLAgentWearables::createStandardWearablesAllDone() mWearablesLoaded = TRUE; checkWearablesLoaded(); - mLoadedSignal(); + notifyLoadingFinished(); updateServer(); @@ -1460,7 +1461,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it // Start rendering & update the server mWearablesLoaded = TRUE; checkWearablesLoaded(); - mLoadedSignal(); + notifyLoadingFinished(); queryWearableCache(); updateServer(); @@ -1945,7 +1946,7 @@ void LLAgentWearables::updateWearablesLoaded() mWearablesLoaded = (itemUpdatePendingCount()==0); if (mWearablesLoaded) { - mLoadedSignal(); + notifyLoadingFinished(); } } @@ -2111,7 +2112,13 @@ boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_ void LLAgentWearables::notifyLoadingStarted() { + mCOFChangeInProgress = true; mLoadingStartedSignal(); } +void LLAgentWearables::notifyLoadingFinished() +{ + mCOFChangeInProgress = false; + mLoadedSignal(); +} // EOF -- cgit v1.2.3 From 9745a0a9e4fab00da010793994c6d50e42635ebe Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 17 Jun 2010 17:03:05 +0300 Subject: EXT-7777 WIP Added several cases to show Loading indicator in "My Outfits:" * Outfit is loading for the first time * After user clicks: ** Item Context menu > Add ** Item Context menu > Replace Known Issues: 1. For multi-wearable indicator will disappear after first item from the batch is worn. Did not fix this to not affect the stability before 2.1 release. 2. To show loading indicator first time we have to notify subscribers of LLAgentWearables. For now this is done from the deprecated LLAgentWearables::processAgentInitialWearablesUpdate Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/602/ --HG-- branch : product-engine --- indra/newview/llagentwearables.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 05ed6ec350..3923749e64 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -921,13 +921,18 @@ BOOL LLAgentWearables::isWearingItem(const LLUUID& item_id) const // static // ! BACKWARDS COMPATIBILITY ! When we stop supporting viewer1.23, we can assume // that viewers have a Current Outfit Folder and won't need this message, and thus -// we can remove/ignore this whole function. +// we can remove/ignore this whole function. EXCEPT gAgentWearables.notifyLoadingStarted void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data) { // We should only receive this message a single time. Ignore subsequent AgentWearablesUpdates // that may result from AgentWearablesRequest having been sent more than once. if (mInitialWearablesUpdateReceived) return; + + // notify subscribers that wearables started loading. See EXT-7777 + // *TODO: find more proper place to not be called from deprecated method. + gAgentWearables.notifyLoadingStarted(); + mInitialWearablesUpdateReceived = true; LLUUID agent_id; -- cgit v1.2.3 From 89825da530f0f5bb4ed2f5260c213174a34f28d8 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 18 Jun 2010 17:28:32 +0300 Subject: EXT-7777 WIP Implemented loading indicator for "Save" and "Save As" actions in "My Outfits" & "Edit Outfit" Panels. EXT-7929 FIXED Updated functionality of attaching object: loading indicator gets hidden when attaching is completed. - Fixed crash when accessing singleton on application exit. - Updated functionality of attaching object: loading indicator was not hidden. * Reason: link to attachment was created without next appearance updating. * Fix: passed "true" into LLAppearanceMgr::addCOFItemLink to call LLAppearanceMgr::updateAppearanceFromCOF when attachments is completed. (Like for clothing). Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/611/ --HG-- branch : product-engine --- indra/newview/llagentwearables.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 3923749e64..66866618e1 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -47,6 +47,7 @@ #include "llinventorypanel.h" #include "llmd5.h" #include "llnotificationsutil.h" +#include "lloutfitobserver.h" #include "llpaneloutfitsinventory.h" #include "llsidepanelappearance.h" #include "llsidetray.h" @@ -179,6 +180,13 @@ void LLAgentWearables::cleanup() { } +// static +void LLAgentWearables::initClass() +{ + // this can not be called from constructor because its instance is global and is created too early. + LLOutfitObserver::instance().addCOFSavedCallback(boost::bind(&LLAgentWearables::notifyLoadingFinished, &gAgentWearables)); +} + void LLAgentWearables::setAvatarObject(LLVOAvatarSelf *avatar) { if (avatar) @@ -931,6 +939,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs // notify subscribers that wearables started loading. See EXT-7777 // *TODO: find more proper place to not be called from deprecated method. + // Seems such place is found: LLInitialWearablesFetch::processContents() gAgentWearables.notifyLoadingStarted(); mInitialWearablesUpdateReceived = true; -- cgit v1.2.3 From b12c98e48ce44df907c7477e1c21061778459496 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 21 Jun 2010 12:49:04 +0300 Subject: EXT-7777 Just added more descriptive comment. --HG-- branch : product-engine --- indra/newview/llagentwearables.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 66866618e1..5728256dba 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -184,6 +184,7 @@ void LLAgentWearables::cleanup() void LLAgentWearables::initClass() { // this can not be called from constructor because its instance is global and is created too early. + // Subscribe to "COF is Saved" signal to notify observers about this (Loading indicator for ex.). LLOutfitObserver::instance().addCOFSavedCallback(boost::bind(&LLAgentWearables::notifyLoadingFinished, &gAgentWearables)); } -- cgit v1.2.3