summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llagentwearables.cpp11
-rw-r--r--indra/newview/llagentwearables.h11
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp18
-rw-r--r--indra/newview/llpaneloutfitsinventory.h2
-rw-r--r--indra/newview/llsidepanelappearance.cpp6
-rw-r--r--indra/newview/llsidepanelappearance.h1
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_appearance.xml8
7 files changed, 57 insertions, 0 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index b5fde0baca..47735e7179 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1164,6 +1164,7 @@ void LLAgentWearables::createStandardWearablesAllDone()
mWearablesLoaded = TRUE;
checkWearablesLoaded();
+ mLoadedSignal();
updateServer();
@@ -1567,6 +1568,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
// Start rendering & update the server
mWearablesLoaded = TRUE;
checkWearablesLoaded();
+ mLoadedSignal();
queryWearableCache();
updateServer();
@@ -2012,6 +2014,10 @@ BOOL LLAgentWearables::areWearablesLoaded() const
void LLAgentWearables::updateWearablesLoaded()
{
mWearablesLoaded = (itemUpdatePendingCount()==0);
+ if (mWearablesLoaded)
+ {
+ mLoadedSignal();
+ }
}
bool LLAgentWearables::canWearableBeRemoved(const LLWearable* wearable) const
@@ -2091,3 +2097,8 @@ void LLAgentWearables::populateMyOutfitsFolder(void)
outfits->done();
}
}
+
+boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_t cb)
+{
+ return mLoadedSignal.connect(cb);
+}
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index d3b18f68f1..a28cba0343 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -209,6 +209,17 @@ public:
U32 itemUpdatePendingCount() const;
//--------------------------------------------------------------------
+ // Signals
+ //--------------------------------------------------------------------
+public:
+ typedef boost::function<void()> loaded_callback_t;
+ typedef boost::signals2::signal<void()> loaded_signal_t;
+ boost::signals2::connection addLoadedCallback(loaded_callback_t cb);
+
+private:
+ loaded_signal_t mLoadedSignal; // emitted when all agent wearables get loaded
+
+ //--------------------------------------------------------------------
// Member variables
//--------------------------------------------------------------------
private:
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 59c1fb4f3c..e36e63521e 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -77,6 +77,7 @@ LLPanelOutfitsInventory::LLPanelOutfitsInventory() :
{
mSavedFolderState = new LLSaveFolderState();
mSavedFolderState->setApply(FALSE);
+ gAgentWearables.addLoadedCallback(boost::bind(&LLPanelOutfitsInventory::onWearablesLoaded, this));
}
LLPanelOutfitsInventory::~LLPanelOutfitsInventory()
@@ -190,6 +191,7 @@ void LLPanelOutfitsInventory::onWearButtonClick()
if (!isCOFPanelActive())
{
mMyOutfitsPanel->performAction("replaceoutfit");
+ setWearablesLoading(true);
}
else
{
@@ -642,3 +644,19 @@ BOOL LLPanelOutfitsInventory::isCOFPanelActive() const
{
return (childGetVisibleTab("appearance_tabs")->getName() == COF_TAB_NAME);
}
+
+void LLPanelOutfitsInventory::setWearablesLoading(bool val)
+{
+ mListCommands->childSetEnabled("wear_btn", !val);
+
+ llassert(mParent);
+ if (mParent)
+ {
+ mParent->setWearablesLoading(val);
+ }
+}
+
+void LLPanelOutfitsInventory::onWearablesLoaded()
+{
+ setWearablesLoading(false);
+}
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 975d99f834..6b4d1dbd84 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -123,6 +123,8 @@ protected:
void onCustomAction(const LLSD& command_name);
bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept);
bool hasItemsSelected();
+ void setWearablesLoading(bool val);
+ void onWearablesLoaded();
private:
LLPanel* mListCommands;
LLMenuGL* mMenuGearDefault;
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 08098e2adb..18f12955ce 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -439,3 +439,9 @@ void LLSidepanelAppearance::inventoryFetched()
{
mNewOutfitBtn->setEnabled(true);
}
+
+void LLSidepanelAppearance::setWearablesLoading(bool val)
+{
+ childSetVisible("wearables_loading_indicator", val);
+ childSetVisible("edit_outfit_btn", !val);
+}
diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h
index 0a2d882a0b..2900831099 100644
--- a/indra/newview/llsidepanelappearance.h
+++ b/indra/newview/llsidepanelappearance.h
@@ -65,6 +65,7 @@ public:
void showOutfitsInventoryPanel();
void showOutfitEditPanel();
+ void setWearablesLoading(bool val);
private:
void onFilterEdit(const std::string& search_string);
diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
index e74c70789f..6a3c148456 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
@@ -94,6 +94,14 @@ width="333">
name="edit_outfit_btn"
top="7"
width="30" />
+ <loading_indicator
+ follows="left|top"
+ height="24"
+ layout="topleft"
+ left="268"
+ name="wearables_loading_indicator"
+ top="6"
+ width="24" />
</panel>
<filter_editor
height="23"