diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-06-22 15:59:56 +0300 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-06-22 15:59:56 +0300 |
commit | 7132b7485eac8a73c5c3f68cfeadc6509c106145 (patch) | |
tree | 1d44a4b8a48ad5653ed57f7c77a14e52875bcd8d /indra | |
parent | 75d3856811a05a51888bb4fa22766ac8f8ec02be (diff) | |
parent | bedc5790e02af04b77a97054f742aba7a02bc033 (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lloutfitslist.cpp | 10 | ||||
-rw-r--r-- | indra/newview/lloutfitslist.h | 5 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 16 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_outfit_gear.xml | 13 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_edit_wearable.xml | 781 |
5 files changed, 419 insertions, 406 deletions
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index c5043e1c3d..6542afc366 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -288,6 +288,9 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) // Setting tab focus callback to monitor currently selected outfit. tab->setFocusReceivedCallback(boost::bind(&LLOutfitsList::changeOutfitSelection, this, list, cat_id)); + // Setting callback to reset items selection inside outfit on accordion collapsing and expanding (EXT-7875) + tab->setDropDownStateChangedCallback(boost::bind(&LLOutfitsList::resetItemSelection, this, list, cat_id)); + // Setting list commit callback to monitor currently selected wearable item. list->setCommitCallback(boost::bind(&LLOutfitsList::onSelectionChange, this, _1)); @@ -486,6 +489,13 @@ void LLOutfitsList::updateOutfitTab(const LLUUID& category_id) } } +void LLOutfitsList::resetItemSelection(LLWearableItemsList* list, const LLUUID& category_id) +{ + list->resetSelection(); + mItemSelected = false; + setSelectedOutfitUUID(category_id); +} + void LLOutfitsList::changeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id) { MASK mask = gKeyboard->currentMask(TRUE); diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index df65f7187b..a6b9a66836 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -123,6 +123,11 @@ private: void changeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id); /** + *Resets items selection inside outfit + */ + void resetItemSelection(LLWearableItemsList* list, const LLUUID& category_id); + + /** * Saves newly selected outfit ID. */ void setSelectedOutfitUUID(const LLUUID& category_id); diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 714d9cd4c5..d382c77430 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -86,6 +86,7 @@ public: registrar.add("Gear.Wear", boost::bind(&LLOutfitListGearMenu::onWear, this)); registrar.add("Gear.TakeOff", boost::bind(&LLOutfitListGearMenu::onTakeOff, this)); + registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenu::onRename, this)); registrar.add("Gear.Delete", boost::bind(&LLOutfitListGearMenu::onDelete, this)); registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2)); @@ -158,6 +159,15 @@ private: } } + void onRename() + { + const LLUUID& selected_outfit_id = getSelectedOutfitID(); + if (selected_outfit_id.notNull()) + { + LLAppearanceMgr::instance().renameOutfit(selected_outfit_id); + } + } + void onDelete() { const LLUUID& selected_outfit_id = getSelectedOutfitID(); @@ -187,7 +197,11 @@ private: return false; } - if ("delete" == param) + if ("rename" == param) + { + return get_is_category_renameable(&gInventory, selected_outfit_id); + } + else if ("delete" == param) { return LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit_id); } 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 16b33eff89..8e7ef7f0b5 100644 --- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml @@ -176,6 +176,19 @@ <menu_item_separator name="sepatator2" /> <menu_item_call + label="Rename Outfit" + layout="topleft" + name="rename"> + <on_click + function="Gear.Rename" /> + <on_enable + function="Gear.OnEnable" + parameter="rename" /> + <on_visible + function="Gear.OnVisible" + parameter="rename" /> + </menu_item_call> + <menu_item_call label="Delete Outfit" layout="topleft" name="delete_outfit"> diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml index 00c5325039..1ab9f722d0 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml @@ -1,428 +1,399 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel background_visible="true" - bevel_style="in" + bevel_style="in" follows="all" height="570" + help_topic="edit_wearable" label="Wearable" layout="topleft" -left="0" - help_topic="edit_wearable" + left="0" name="panel_edit_wearable" - top="0" + top="0" width="333"> - <string - name="edit_shape_title"> - Editing Shape - </string> - <string - name="edit_skin_title"> - Editing Skin - </string> - <string - name="edit_hair_title"> - Editing Hair - </string> - <string - name="edit_eyes_title"> - Editing Eyes - </string> - <string - name="edit_shirt_title"> - Editing Shirt - </string> - <string - name="edit_pants_title"> - Editing Pants - </string> - <string - name="edit_shoes_title"> - Editing Shoes - </string> - <string - name="edit_socks_title"> - Editing Socks - </string> - <string - name="edit_jacket_title"> - Editing Jacket - </string> - <string - name="edit_skirt_title"> - Editing Skirt - </string> - <string - name="edit_gloves_title"> - Editing Gloves - </string> - <string - name="edit_undershirt_title"> - Editing Undershirt - </string> - <string - name="edit_underpants_title"> - Editing Underpants - </string> - <string - name="edit_alpha_title"> - Editing Alpha Mask - </string> - <string - name="edit_tattoo_title"> - Editing Tattoo - </string> - <string - name="shape_desc_text"> - Shape: - </string> - <string - name="skin_desc_text"> - Skin: - </string> - <string - name="hair_desc_text"> - Hair: - </string> - <string - name="eyes_desc_text"> - Eyes: - </string> - <string - name="shirt_desc_text"> - Shirt: - </string> - <string - name="pants_desc_text"> - Pants: - </string> - <string - name="shoes_desc_text"> - Shoes: - </string> - <string - name="socks_desc_text"> - Socks: - </string> - <string - name="jacket_desc_text"> - Jacket: - </string> - <string - name="skirt_desc_text"> - Skirt: - </string> - <string - name="gloves_desc_text"> - Gloves: - </string> - <string - name="undershirt_desc_text"> - Undershirt: - </string> - <string - name="underpants_desc_text"> - Underpants: - </string> - <string - name="alpha_desc_text"> - Alpha Mask: - </string> - <string - name="tattoo_desc_text"> - Tattoo: - </string> + <string + name="edit_shape_title" + value="Editing Shape" /> + <string + name="edit_skin_title" + value="Editing Skin" /> + <string + name="edit_hair_title" + value="Editing Hair" /> + <string + name="edit_eyes_title" + value="Editing Eyes" /> + <string + name="edit_shirt_title" + value="Editing Shirt" /> + <string + name="edit_pants_title" + value="Editing Pants" /> + <string + name="edit_shoes_title" + value="Editing Shoes" /> + <string + name="edit_socks_title" + value="Editing Socks" /> + <string + name="edit_jacket_title" + value="Editing Jacket" /> + <string + name="edit_skirt_title" + value="Editing Skirt" /> + <string + name="edit_gloves_title" + value="Editing Gloves" /> + <string + name="edit_undershirt_title" + value="Editing Undershirt" /> + <string + name="edit_underpants_title" + value="Editing Underpants" /> + <string + name="edit_alpha_title" + value="Editing Alpha Mask" /> + <string + name="edit_tattoo_title" + value="Editing Tattoo" /> + <string + name="shape_desc_text" + value="Shape:" /> + <string + name="skin_desc_text" + value="Skin:" /> + <string + name="hair_desc_text" + value="Hair:" /> + <string + name="eyes_desc_text" + value="Eyes:" /> + <string + name="shirt_desc_text" + value="Shirt:" /> + <string + name="pants_desc_text" + value="Pants:" /> + <string + name="shoes_desc_text" + value="Shoes:" /> + <string + name="socks_desc_text" + value="Socks:" /> + <string + name="jacket_desc_text" + value="Jacket:" /> + <string + name="skirt_desc_text" + value="Skirt:" /> + <string + name="gloves_desc_text" + value="Gloves:" /> + <string + name="undershirt_desc_text" + value="Undershirt:" /> + <string + name="underpants_desc_text" + value="Underpants:" /> + <string + name="alpha_desc_text" + value="Alpha Mask:" /> + <string + name="tattoo_desc_text" + value="Tattoo:" /> <button follows="top|left" height="24" - width="30" image_hover_unselected="BackButton_Over" image_pressed="BackButton_Press" image_unselected="BackButton_Off" layout="topleft" - name="back_btn" left="11" - top="3" /> - <text - follows="top|left" - font="SansSerifHugeBold" - height="22" - layout="topleft" - left_pad="8" - name="edit_wearable_title" - text_color="white" - top="3" - value="Editing Shape" - width="270" /> - <panel - border="false" - bg_alpha_color="DkGray2" - bg_opaque_color="DkGray2" - background_visible="true" - background_opaque="true" + name="back_btn" + top="3" + width="30" /> + <text + follows="top|left" + font="SansSerifHugeBold" + height="22" + layout="topleft" + left_pad="8" + name="edit_wearable_title" + text_color="white" + top="3" + value="Editing Shape" + width="270" /> + <panel + background_opaque="true" + background_visible="true" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + border="false" + follows="top|left|right" + height="60" + label="Shirt" + layout="topleft" + left="10" + name="wearable_type_panel" + top_pad="10" + width="313"> + <text follows="top|left|right" - height="60" - label="Shirt" + font="SansSerifSmallBold" + height="16" + layout="topleft" + left="10" + name="description_text" + text_color="white" + top="10" + value="Shape:" + width="150" /> + <radio_group + control_name="AvatarSex" + follows="left|top|right" + height="20" layout="topleft" - left="10" - name="wearable_type_panel" - top_pad="10" - width="313"> - <text - follows="top|left|right" - font="SansSerifSmallBold" - height="16" - layout="topleft" - left="10" - name="description_text" - text_color="white" - top="10" - value="Shape:" - width="150" /> - <radio_group - control_name="AvatarSex" - follows="left|top|right" - left="210" - height="20" - layout="topleft" - name="sex_radio" - top="5" - width="110"> - <radio_item - follows="all" - height="16" - label="" - layout="topleft" - left="0" - name="sex_male" - tool_tip="Male" - value="1" - width="40" /> - <radio_item - follows="all" - height="16" - label="" - layout="topleft" - left_pad="10" - name="sex_female" - tool_tip="Female" - value="0" - width="40" /> - </radio_group> - <!-- graphical labels for the radio buttons above --> - <icon - height="16" - image_name="icons/Male.png" - left="230" - name="male_icon" - tool_tip="Male" - top="7" - width="16" /> - <icon - height="16" - image_name="icons/Female.png" - name="female_icon" - left="280" - tool_tip="Female" - top="7" - width="16" /> - <line_editor + left="210" + name="sex_radio" + top="5" + width="110"> + <radio_item follows="all" - height="23" + height="16" + label="" layout="topleft" - left="10" - max_length="63" - name="description" - prevalidate_callback="ascii" - text_color="black" - top_pad="3" - width="290" /> - </panel> - <panel - follows="all" - height="433" - layout="topleft" - left="0" - name="edit_subpanel_container" - top_pad="2" - width="333"> - <!-- the shape editing panel is taller than the others + left="0" + name="sex_male" + tool_tip="Male" + value="1" + width="40" /> + <radio_item + follows="all" + height="16" + label="" + layout="topleft" + left_pad="10" + name="sex_female" + tool_tip="Female" + value="0" + width="40"/> + </radio_group> + <!-- graphical labels for the radio buttons above --> + <icon + height="16" + image_name="icons/Male.png" + layout="topleft" + left="230" + name="male_icon" + tool_tip="Male" + top="7" + width="16" /> + <icon + height="16" + image_name="icons/Female.png" + layout="topleft" + left="280" + name="female_icon" + tool_tip="Female" + top="7" + width="16" /> + <line_editor + follows="all" + height="23" + layout="topleft" + left="10" + max_length="63" + name="description" + prevalidate_callback="ascii" + text_color="black" + top_pad="3" + width="290" /> + </panel> + <panel + follows="all" + height="433" + layout="topleft" + left="0" + name="edit_subpanel_container" + top_pad="2" + width="333"> + <!-- the shape editing panel is taller than the others because it also displays avatar height --> - <panel - filename="panel_edit_shape.xml" - follows="all" - height="433" - layout="topleft" - left="0" - name="edit_shape_panel" - top="0" - visible="false" - width="333" /> - <panel - filename="panel_edit_skin.xml" - follows="all" - height="425" - layout="topleft" - left="0" - name="edit_skin_panel" - top="8" - visible="false" - width="333" /> - <panel - filename="panel_edit_hair.xml" - follows="all" - height="425" - layout="topleft" - left="0" - name="edit_hair_panel" - top="8" - visible="false" - width="333" /> - <panel - filename="panel_edit_eyes.xml" - follows="all" - height="425" - layout="topleft" - left="0" - name="edit_eyes_panel" - top="8" - visible="false" - width="333" /> - <panel - filename="panel_edit_shirt.xml" - follows="all" - height="425" - layout="topleft" - left="0" - name="edit_shirt_panel" - top="8" - visible="false" - width="333" /> - <panel - filename="panel_edit_pants.xml" - follows="all" - height="425" - layout="topleft" - left="0" - name="edit_pants_panel" - top="8" - visible="false" - width="333" /> - <panel - filename="panel_edit_shoes.xml" - follows="all" - height="425" - layout="topleft" - left="0" - name="edit_shoes_panel" - top="8" - visible="false" - width="333" /> - <panel - filename="panel_edit_socks.xml" - follows="all" - height="425" - layout="topleft" - left="0" - name="edit_socks_panel" - top="8" - visible="false" - width="333" /> - <panel - filename="panel_edit_jacket.xml" - follows="all" - height="425" - layout="topleft" - left="0" - name="edit_jacket_panel" - top="8" - visible="false" - width="333" /> - <panel - filename="panel_edit_skirt.xml" - follows="all" - height="425" - layout="topleft" - left="0" - name="edit_skirt_panel" - top="8" - visible="false" - width="333" /> - <panel - filename="panel_edit_gloves.xml" - follows="all" - height="425" - layout="topleft" - left="0" - name="edit_gloves_panel" - top="8" - visible="false" - width="333" /> - <panel - filename="panel_edit_undershirt.xml" - follows="all" - height="425" - layout="topleft" - left="0" - name="edit_undershirt_panel" - top="8" - visible="false" - width="333" /> - <panel - filename="panel_edit_underpants.xml" - follows="all" - height="425" - layout="topleft" - left="0" - name="edit_underpants_panel" - top="8" - visible="false" - width="333" /> - <panel - filename="panel_edit_alpha.xml" - follows="all" - height="425" - layout="topleft" - left="0" - name="edit_alpha_panel" - top="8" - visible="false" - width="333" /> - <panel - filename="panel_edit_tattoo.xml" - follows="all" - height="425" - layout="topleft" - left="0" - name="edit_tattoo_panel" - top="8" - visible="false" - width="333" /> - </panel> - - <panel - follows="bottom|left|right" - height="23" - layout="topleft" - left="2" - name="button_panel" - top_pad="6" - width="333" > - <button - follows="bottomleft" - layout="topleft" - height="23" - label="Save As" - left="8" - name="save_as_button" - top="0" - width="153" /> - <button - follows="bottomleft" - layout="topleft" - height="23" - label="Revert" - left_pad="7" - name="revert_button" - width="152" /> - </panel> + <panel + filename="panel_edit_shape.xml" + follows="all" + height="433" + layout="topleft" + left="0" + name="edit_shape_panel" + top="0" + visible="false" + width="333" /> + <panel + filename="panel_edit_skin.xml" + follows="all" + height="425" + layout="topleft" + left="0" + name="edit_skin_panel" + top="8" + visible="false" + width="333" /> + <panel + filename="panel_edit_hair.xml" + follows="all" + height="425" + layout="topleft" + left="0" + name="edit_hair_panel" + top="8" + visible="false" + width="333" /> + <panel + filename="panel_edit_eyes.xml" + follows="all" + height="425" + layout="topleft" + left="0" + name="edit_eyes_panel" + top="8" + visible="false" + width="333" /> + <panel + filename="panel_edit_shirt.xml" + follows="all" + height="425" + layout="topleft" + left="0" + name="edit_shirt_panel" + top="8" + visible="false" + width="333" /> + <panel + filename="panel_edit_pants.xml" + follows="all" + height="425" + layout="topleft" + left="0" + name="edit_pants_panel" + top="8" + visible="false" + width="333" /> + <panel + filename="panel_edit_shoes.xml" + follows="all" + height="425" + layout="topleft" + left="0" + name="edit_shoes_panel" + top="8" + visible="false" + width="333" /> + <panel + filename="panel_edit_socks.xml" + follows="all" + height="425" + layout="topleft" + left="0" + name="edit_socks_panel" + top="8" + visible="false" + width="333" /> + <panel + filename="panel_edit_jacket.xml" + follows="all" + height="425" + layout="topleft" + left="0" + name="edit_jacket_panel" + top="8" + visible="false" + width="333" /> + <panel + filename="panel_edit_skirt.xml" + follows="all" + height="425" + layout="topleft" + left="0" + name="edit_skirt_panel" + top="8" + visible="false" + width="333" /> + <panel + filename="panel_edit_gloves.xml" + follows="all" + height="425" + layout="topleft" + left="0" + name="edit_gloves_panel" + top="8" + visible="false" + width="333" /> + <panel + filename="panel_edit_undershirt.xml" + follows="all" + height="425" + layout="topleft" + left="0" + name="edit_undershirt_panel" + top="8" + visible="false" + width="333" /> + <panel + filename="panel_edit_underpants.xml" + follows="all" + height="425" + layout="topleft" + left="0" + name="edit_underpants_panel" + top="8" + visible="false" + width="333" /> + <panel + filename="panel_edit_alpha.xml" + follows="all" + height="425" + layout="topleft" + left="0" + name="edit_alpha_panel" + top="8" + visible="false" + width="333" /> + <panel + filename="panel_edit_tattoo.xml" + follows="all" + height="425" + layout="topleft" + left="0" + name="edit_tattoo_panel" + top="8" + visible="false" + width="333" /> + </panel> + <panel + follows="bottom|left|right" + height="23" + layout="topleft" + left="2" + name="button_panel" + top_pad="6" + width="333"> + <button + follows="bottomleft" + height="23" + label="Save As" + layout="topleft" + left="8" + name="save_as_button" + top="0" + width="153" /> + <button + follows="bottomleft" + height="23" + label="Revert" + layout="topleft" + left_pad="7" + name="revert_button" + width="152" /> + </panel> </panel> |