diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-01-06 12:33:28 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-01-06 12:33:28 -0500 |
commit | cdb158e9e0cff7070bb68c721cec0e90b0030fb2 (patch) | |
tree | a630681fab4cb0788661f55644e3de1d81863de8 /indra/newview/llpaneloutfitsinventory.cpp | |
parent | af61dd45b3afe8b62dceeb55a2ded7a9cfa34117 (diff) |
EXT-3954 : "Wear" button shouldn't be enabled in "Wearing" tab
EXT-3952 : "Make Outfit" button shouldn't be enabled in "Wearing" tab
EXT-3955 : "Add to Current Outfit" gear menu option confusing, remove it
EXT-3961 : Switch order of "Wearing" and "My Outfits" tabs
Most of these are very minor xui/button-state changes.
Also added a new onOpen method to llpaneloutfitsinventory so that it can update its state (notably, which tab is active) when the sidepanel is opened.
Diffstat (limited to 'indra/newview/llpaneloutfitsinventory.cpp')
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 8e14074de1..41745e4994 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -84,6 +84,14 @@ BOOL LLPanelOutfitsInventory::postBuild() return TRUE; } +// virtual +void LLPanelOutfitsInventory::onOpen(const LLSD& key) +{ + // Make sure we know which tab is selected, update the filter, + // and update verbs. + onTabChange(); +} + void LLPanelOutfitsInventory::updateVerbs() { if (mParent) @@ -94,6 +102,7 @@ void LLPanelOutfitsInventory::updateVerbs() if (mListCommands) { mListCommands->childSetVisible("look_edit_btn",sShowDebugEditor); + updateListCommands(); } } @@ -176,7 +185,6 @@ void LLPanelOutfitsInventory::onNew() void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action) { - updateListCommands(); updateVerbs(); if (getRootFolder()->needsAutoRename() && items.size()) { @@ -264,9 +272,11 @@ void LLPanelOutfitsInventory::updateListCommands() { bool trash_enabled = isActionEnabled("delete"); bool wear_enabled = isActionEnabled("wear"); + bool make_outfit_enabled = isActionEnabled("make_outfit"); mListCommands->childSetEnabled("trash_btn", trash_enabled); mListCommands->childSetEnabled("wear_btn", wear_enabled); + mListCommands->childSetEnabled("make_outfit_btn", make_outfit_enabled); } void LLPanelOutfitsInventory::onGearButtonClick() @@ -323,6 +333,7 @@ void LLPanelOutfitsInventory::onCustomAction(const LLSD& userdata) { onWearButtonClick(); } + // Note: This option has been removed from the gear menu. if (command_name == "add") { onAdd(); @@ -391,6 +402,16 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) } return FALSE; } + if (command_name == "wear" || + command_name == "make_outfit") + { + const BOOL is_my_outfits = (mActivePanel->getName() == "outfitslist_accordionpanel"); + if (!is_my_outfits) + { + return FALSE; + } + } + if (command_name == "edit" || command_name == "wear" || command_name == "add" || @@ -425,17 +446,17 @@ bool LLPanelOutfitsInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropTy void LLPanelOutfitsInventory::initTabPanels() { mTabPanels.resize(2); + + LLInventoryPanel *cof_panel = getChild<LLInventoryPanel>("cof_accordionpanel"); + cof_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); + mTabPanels[0] = cof_panel; LLInventoryPanel *myoutfits_panel = getChild<LLInventoryPanel>("outfitslist_accordionpanel"); myoutfits_panel->setFilterTypes(1LL << LLFolderType::FT_OUTFIT, LLInventoryFilter::FILTERTYPE_CATEGORY); myoutfits_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - mTabPanels[0] = myoutfits_panel; - mActivePanel = myoutfits_panel; - + mTabPanels[1] = myoutfits_panel; - LLInventoryPanel *cof_panel = getChild<LLInventoryPanel>("cof_accordionpanel"); - cof_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - mTabPanels[1] = cof_panel; + mActivePanel = mTabPanels[0]; for (tabpanels_vec_t::iterator iter = mTabPanels.begin(); iter != mTabPanels.end(); @@ -479,9 +500,7 @@ void LLPanelOutfitsInventory::onTabChange() return; } mActivePanel->setFilterSubString(mFilterSubString); - - bool is_my_outfits = (mActivePanel->getName() == "outfitslist_accordionpanel"); - mListCommands->childSetEnabled("make_outfit_btn", is_my_outfits); + updateVerbs(); } LLInventoryPanel* LLPanelOutfitsInventory::getActivePanel() |