diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lloutfitslist.cpp | 30 | ||||
-rw-r--r-- | indra/newview/lloutfitslist.h | 10 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_outfit_gear.xml | 14 |
3 files changed, 54 insertions, 0 deletions
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index ef5ef2ddc8..c15b6bd0d3 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -117,6 +117,8 @@ public: registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenu::onRename, this)); registrar.add("Gear.Delete", boost::bind(&LLOutfitsList::removeSelected, mOutfitList)); registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2)); + registrar.add("Gear.Collapse", boost::bind(&LLOutfitsList::collapse_all_folders, mOutfitList)); + registrar.add("Gear.Expand", boost::bind(&LLOutfitsList::expand_all_folders, mOutfitList)); registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenu::onAdd, this)); @@ -743,6 +745,34 @@ void LLOutfitsList::getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const } } +void LLOutfitsList::collapse_all_folders() +{ + for (outfits_map_t::iterator iter = mOutfitsMap.begin(); + iter != mOutfitsMap.end(); + ++iter) + { + LLAccordionCtrlTab* tab = iter->second; + if(tab && tab->isExpanded()) + { + tab->changeOpenClose(true); + } + } +} + +void LLOutfitsList::expand_all_folders() +{ + for (outfits_map_t::iterator iter = mOutfitsMap.begin(); + iter != mOutfitsMap.end(); + ++iter) + { + LLAccordionCtrlTab* tab = iter->second; + if(tab && !tab->isExpanded()) + { + tab->changeOpenClose(false); + } + } +} + boost::signals2::connection LLOutfitsList::setSelectionChangeCallback(selection_change_callback_t cb) { return mSelectionChangeSignal.connect(cb); diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index a0598737f1..2e3fb3f488 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -108,6 +108,16 @@ public: */ bool hasItemSelected(); + /** + Collapses all outfit accordions. + */ + void collapse_all_folders(); + /** + Expands all outfit accordions. + */ + void expand_all_folders(); + + private: void onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response); diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml index fc7272b904..3b8ace6308 100644 --- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml @@ -195,6 +195,20 @@ <menu_item_separator name="sepatator2" /> <menu_item_call + label="Expand all folders" + layout="topleft" + name="expand"> + <on_click + function="Gear.Expand" /> + </menu_item_call> + <menu_item_call + label="Collapse all folders" + layout="topleft" + name="collapse"> + <on_click + function="Gear.Collapse" /> + </menu_item_call> + <menu_item_call label="Rename Outfit" layout="topleft" name="rename"> |