diff options
author | Mike Antipov <mantipov@productengine.com> | 2010-06-22 14:35:45 +0300 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2010-06-22 14:35:45 +0300 |
commit | 9a397826dd5bbe04b827496ff6f802a9a5552306 (patch) | |
tree | 3b6dbed2d7cb917b5cf8d5d79914f9553400d268 /indra | |
parent | c773e01fbf795d8d40b19f8d9163898712509770 (diff) |
EXT-7789 FIXED reverted changes with removing "Rename Outfit" from gear menu
Backed out changeset: f0e9147baf74
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 16 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_outfit_gear.xml | 13 |
2 files changed, 28 insertions, 1 deletions
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 7e1bff0961..5563214407 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"> |