summaryrefslogtreecommitdiff
path: root/indra/newview/llcofwearables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llcofwearables.cpp')
-rw-r--r--indra/newview/llcofwearables.cpp45
1 files changed, 33 insertions, 12 deletions
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index 04623c03be..b1e11e1a2a 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -514,10 +514,10 @@ LLPanelClothingListItem* LLCOFWearables::buildClothingListItem(LLViewerInventory
//setting callbacks
//*TODO move that item panel's inner structure disclosing stuff into the panels
- item_panel->childSetAction("btn_delete", mCOFCallbacks.mDeleteWearable);
- item_panel->childSetAction("btn_move_up", mCOFCallbacks.mMoveWearableFurther);
- item_panel->childSetAction("btn_move_down", mCOFCallbacks.mMoveWearableCloser);
- item_panel->childSetAction("btn_edit", mCOFCallbacks.mEditWearable);
+ item_panel->childSetAction("btn_delete", boost::bind(mCOFCallbacks.mDeleteWearable));
+ item_panel->childSetAction("btn_move_up", boost::bind(mCOFCallbacks.mMoveWearableFurther));
+ item_panel->childSetAction("btn_move_down", boost::bind(mCOFCallbacks.mMoveWearableCloser));
+ item_panel->childSetAction("btn_edit", boost::bind(mCOFCallbacks.mEditWearable));
//turning on gray separator line for the last item in the items group of the same wearable type
item_panel->setSeparatorVisible(last);
@@ -543,8 +543,8 @@ LLPanelBodyPartsListItem* LLCOFWearables::buildBodypartListItem(LLViewerInventor
//setting callbacks
//*TODO move that item panel's inner structure disclosing stuff into the panels
- item_panel->childSetAction("btn_delete", mCOFCallbacks.mDeleteWearable);
- item_panel->childSetAction("btn_edit", mCOFCallbacks.mEditWearable);
+ item_panel->childSetAction("btn_delete", boost::bind(mCOFCallbacks.mDeleteWearable));
+ item_panel->childSetAction("btn_edit", boost::bind(mCOFCallbacks.mEditWearable));
return item_panel;
}
@@ -559,7 +559,7 @@ LLPanelDeletableWearableListItem* LLCOFWearables::buildAttachemntListItem(LLView
//setting callbacks
//*TODO move that item panel's inner structure disclosing stuff into the panels
- item_panel->childSetAction("btn_delete", mCOFCallbacks.mDeleteWearable);
+ item_panel->childSetAction("btn_delete", boost::bind(mCOFCallbacks.mDeleteWearable));
return item_panel;
}
@@ -605,7 +605,7 @@ void LLCOFWearables::addClothingTypesDummies(const LLAppearanceMgr::wearables_by
LLWearableType::EType w_type = static_cast<LLWearableType::EType>(type);
LLPanelInventoryListItemBase* item_panel = LLPanelDummyClothingListItem::create(w_type);
if(!item_panel) continue;
- item_panel->childSetAction("btn_add", mCOFCallbacks.mAddWearable);
+ item_panel->childSetAction("btn_add", boost::bind(mCOFCallbacks.mAddWearable));
mClothing->addItem(item_panel, LLUUID::null, ADD_BOTTOM, false);
}
}
@@ -657,20 +657,20 @@ LLAssetType::EType LLCOFWearables::getExpandedAccordionAssetType()
{
const LLAccordionCtrlTab* expanded_tab = mAccordionCtrl->getExpandedTab();
- return get_if_there(mTab2AssetType, expanded_tab, LLAssetType::AT_NONE);
+ return get_if_there(mTab2AssetType, expanded_tab, LLAssetType::AT_NONE);
}
return LLAssetType::AT_NONE;
}
LLAssetType::EType LLCOFWearables::getSelectedAccordionAssetType()
-{
+ {
if (mAccordionCtrl != NULL)
{
const LLAccordionCtrlTab* selected_tab = mAccordionCtrl->getSelectedTab();
- return get_if_there(mTab2AssetType, selected_tab, LLAssetType::AT_NONE);
- }
+ return get_if_there(mTab2AssetType, selected_tab, LLAssetType::AT_NONE);
+}
return LLAssetType::AT_NONE;
}
@@ -708,4 +708,25 @@ void LLCOFWearables::onListRightClick(LLUICtrl* ctrl, S32 x, S32 y, LLListContex
}
}
+void LLCOFWearables::selectClothing(LLWearableType::EType clothing_type)
+{
+ std::vector<LLPanel*> clothing_items;
+
+ mClothing->getItems(clothing_items);
+
+ std::vector<LLPanel*>::iterator it;
+
+ for (it = clothing_items.begin(); it != clothing_items.end(); ++it )
+ {
+ LLPanelClothingListItem* clothing_item = dynamic_cast<LLPanelClothingListItem*>(*it);
+
+ if (clothing_item && clothing_item->getWearableType() == clothing_type)
+ { // clothing item has specified LLWearableType::EType. Select it and exit.
+
+ mClothing->selectItem(clothing_item);
+ break;
+ }
+ }
+}
+
//EOF