summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llappearancemgr.cpp3
-rw-r--r--indra/newview/llappearancemgr.h3
-rw-r--r--indra/newview/lloutfitslist.cpp5
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp16
-rw-r--r--indra/newview/llpaneloutfitsinventory.h4
-rw-r--r--indra/newview/llsidepanelappearance.cpp10
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_tab.xml3
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_appearance.xml3
8 files changed, 40 insertions, 7 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 3947be49bb..f088a620d6 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1697,9 +1697,10 @@ void LLAppearanceMgr::getUserDescendents(const LLUUID& category,
void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append)
{
- gAgentWearables.notifyLoadingStarted();
if(!category) return;
+ gAgentWearables.notifyLoadingStarted();
+
llinfos << "wearInventoryCategory( " << category->getName()
<< " )" << llendl;
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index ab4ff1bcfc..982aa02cd0 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -360,6 +360,9 @@ public:
<< llendl;
//dec_busy_count();
gInventory.removeObserver(this);
+
+ // lets notify observers that loading is finished.
+ gAgentWearables.notifyLoadingFinished();
delete this;
return;
}
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 6542afc366..b3d39f2a4a 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -103,8 +103,13 @@ protected:
{
return get_is_category_renameable(&gInventory, outfit_cat_id);
}
+ else if ("wear_replace" == param)
+ {
+ return !gAgentWearables.isCOFChangeInProgress();
+ }
else if ("wear_add" == param)
{
+ if (gAgentWearables.isCOFChangeInProgress()) return false;
return LLAppearanceMgr::getCanAddToCOF(outfit_cat_id);
}
else if ("take_off" == param)
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index d382c77430..77c135c716 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -72,11 +72,13 @@ static const std::string COF_TAB_NAME = "cof_tab";
static LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory");
+class LLPanelOutfitsInventory;
class LLOutfitListGearMenu
{
public:
- LLOutfitListGearMenu(LLOutfitsList* olist)
+ LLOutfitListGearMenu(LLOutfitsList* olist, LLPanelOutfitsInventory* parent_panel)
: mOutfitList(olist),
+ mMyOutfitsPanel(parent_panel),
mMenu(NULL)
{
llassert_always(mOutfitList);
@@ -209,6 +211,11 @@ private:
{
return LLAppearanceMgr::getCanRemoveFromCOF(selected_outfit_id);
}
+ else if ("wear" == param)
+ {
+ return mMyOutfitsPanel->isActionEnabled(param);
+ }
+
return true;
}
@@ -233,6 +240,7 @@ private:
LLOutfitsList* mOutfitList;
LLMenuGL* mMenu;
+ LLPanelOutfitsInventory* mMyOutfitsPanel;
};
LLPanelOutfitsInventory::LLPanelOutfitsInventory() :
@@ -550,13 +558,13 @@ void LLPanelOutfitsInventory::initListCommandsHandlers()
, _7 // EAcceptance* accept
));
- mGearMenu = new LLOutfitListGearMenu(mMyOutfitsPanel);
+ mGearMenu = new LLOutfitListGearMenu(mMyOutfitsPanel, this);
}
void LLPanelOutfitsInventory::updateListCommands()
{
bool trash_enabled = isActionEnabled("delete");
- bool wear_enabled = !gAgentWearables.isCOFChangeInProgress() && isActionEnabled("wear");
+ bool wear_enabled = isActionEnabled("wear");
bool wear_visible = !isCOFPanelActive();
bool make_outfit_enabled = isActionEnabled("save_outfit");
@@ -710,6 +718,8 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
if (command_name == "wear")
{
+ if (gAgentWearables.isCOFChangeInProgress()) return FALSE;
+
if (isCOFPanelActive())
{
return FALSE;
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index eabfda7f8c..287fcbf4bb 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -112,6 +112,9 @@ private:
//////////////////////////////////////////////////////////////////////////////////
// List Commands //
+public:
+ BOOL isActionEnabled(const LLSD& command_name);
+
protected:
void initListCommandsHandlers();
void updateListCommands();
@@ -119,7 +122,6 @@ protected:
void showGearMenu();
void onTrashButtonClick();
void onClipboardAction(const LLSD& userdata);
- BOOL isActionEnabled(const LLSD& command_name);
void onCustomAction(const LLSD& command_name);
bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept);
bool hasItemsSelected();
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 0d1be91125..ea5796d766 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -390,8 +390,8 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name)
return;
}
- std::string look_name = gAgentWearables.isCOFChangeInProgress() ? "" : getString("No Outfit");
- mCurrentLookName->setText(look_name);
+ std::string string_name = gAgentWearables.isCOFChangeInProgress() ? "Changing outfits" : "No Outfit";
+ mCurrentLookName->setText(getString(string_name));
mOpenOutfitBtn->setEnabled(FALSE);
}
else
@@ -475,6 +475,12 @@ void LLSidepanelAppearance::setWearablesLoading(bool val)
{
childSetVisible("wearables_loading_indicator", val);
childSetVisible("edit_outfit_btn", !val);
+
+ if (!val)
+ {
+ // refresh outfit name when COF is already changed.
+ refreshCurrentOutfitName();
+ }
}
void LLSidepanelAppearance::showDefaultSubpart()
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
index 9c3151fe07..8c8bb29baf 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
@@ -8,6 +8,9 @@
name="wear_replace">
<on_click
function="Outfit.WearReplace" />
+ <on_enable
+ function="Outfit.OnEnable"
+ parameter="wear_replace" />
<on_visible
function="Outfit.OnVisible"
parameter="wear_replace" />
diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
index e189d11d35..9a07d3a48a 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
@@ -21,6 +21,9 @@ width="333">
<string
name="Now Wearing"
value="Now wearing..." />
+ <string
+ name="Changing outfits"
+ value="Changing outfits" />
<panel
background_opaque="true"
background_visible="true"