From 71c7b2f6d76b29c527d07c01c52127bf4f5b402e Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 19 Apr 2010 13:23:24 +0300 Subject: completed EXT-6764 Implement filtering of wearables (combobox options: Clothes/Body, Objects, All) on Add to Outfit subpanel Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/221/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitedit.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'indra/newview/llpaneloutfitedit.cpp') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 847778f828..ba6473839a 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -133,10 +133,6 @@ mRemoveFromOutfitBtn(NULL), mLookObserver(NULL) mLookItemTypes.push_back(LLLookItemType()); } - // TODO: make these strings translatable - mLookItemTypes[LIT_ALL] = LLLookItemType("All Items", ALL_ITEMS_MASK); - mLookItemTypes[LIT_WEARABLE] = LLLookItemType("Shape & Clothing", WEARABLE_MASK); - mLookItemTypes[LIT_ATTACHMENT] = LLLookItemType("Attachments", ATTACHMENT_MASK); } @@ -159,10 +155,15 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit() BOOL LLPanelOutfitEdit::postBuild() { // gInventory.isInventoryUsable() no longer needs to be tested per Richard's fix for race conditions between inventory and panels - + + mLookItemTypes[LIT_ALL] = LLLookItemType(getString("Filter.All"), ALL_ITEMS_MASK); + mLookItemTypes[LIT_WEARABLE] = LLLookItemType(getString("Filter.Clothes/Body"), WEARABLE_MASK); + mLookItemTypes[LIT_ATTACHMENT] = LLLookItemType(getString("Filter.Objects"), ATTACHMENT_MASK); + mCurrentOutfitName = getChild("curr_outfit_name"); childSetCommitCallback("add_btn", boost::bind(&LLPanelOutfitEdit::showAddWearablesPanel, this), NULL); + childSetCommitCallback("filter_button", boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this), NULL); mLookContents = getChild("look_items_list"); mLookContents->sortByColumn("look_item_sort", TRUE); @@ -174,7 +175,7 @@ BOOL LLPanelOutfitEdit::postBuild() mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); - LLComboBox* type_filter = getChild("inventory_filter"); + LLComboBox* type_filter = getChild("filter_wearables_combobox"); type_filter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onTypeFilterChanged, this, _1)); type_filter->removeall(); for (U32 i = 0; i < mLookItemTypes.size(); ++i) @@ -236,6 +237,11 @@ void LLPanelOutfitEdit::showAddWearablesPanel() childSetVisible("add_wearables_panel", childGetValue("add_btn")); } +void LLPanelOutfitEdit::showWearablesFilter() +{ + childSetVisible("filter_combobox_panel", childGetValue("filter_button")); +} + void LLPanelOutfitEdit::saveOutfit(bool as_new) { if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit()) -- cgit v1.2.3