summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lloutfitgallery.cpp12
-rw-r--r--indra/newview/lloutfitgallery.h1
-rw-r--r--indra/newview/lloutfitslist.cpp57
-rw-r--r--indra/newview/lloutfitslist.h4
-rw-r--r--indra/newview/skins/default/xui/en/menu_gallery_inventory.xml6
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_gallery_outfit_tab.xml94
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml6
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_gear.xml138
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_tab.xml37
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml16
10 files changed, 230 insertions, 141 deletions
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index de988555c5..b26aabca4f 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -1155,22 +1155,13 @@ LLContextMenu* LLOutfitGalleryContextMenu::createMenu()
registrar.add("Outfit.Delete", boost::bind(LLOutfitGallery::onRemoveOutfit, selected_id));
registrar.add("Outfit.Create", boost::bind(&LLOutfitGalleryContextMenu::onCreate, this, _2));
registrar.add("Outfit.Thumbnail", boost::bind(&LLOutfitGalleryContextMenu::onThumbnail, this, selected_id));
+ registrar.add("Outfit.Save", boost::bind(&LLOutfitGalleryContextMenu::onSave, this, selected_id));
enable_registrar.add("Outfit.OnEnable", boost::bind(&LLOutfitGalleryContextMenu::onEnable, this, _2));
enable_registrar.add("Outfit.OnVisible", boost::bind(&LLOutfitGalleryContextMenu::onVisible, this, _2));
return createFromFile("menu_gallery_outfit_tab.xml");
}
-void LLOutfitGalleryContextMenu::onThumbnail(const LLUUID& outfit_cat_id)
-{
- LLOutfitGallery* gallery = dynamic_cast<LLOutfitGallery*>(mOutfitList);
- if (gallery && outfit_cat_id.notNull())
- {
- LLSD data(outfit_cat_id);
- LLFloaterReg::showInstance("change_item_thumbnail", data);
- }
-}
-
void LLOutfitGalleryContextMenu::onCreate(const LLSD& data)
{
LLWearableType::EType type = LLWearableType::getInstance()->typeNameToType(data.asString());
@@ -1205,7 +1196,6 @@ void LLOutfitGalleryGearMenu::onUpdateItemsVisibility()
mMenu->setItemVisible("expand", FALSE);
mMenu->setItemVisible("collapse", FALSE);
mMenu->setItemVisible("thumbnail", have_selection);
- mMenu->setItemVisible("sepatator3", TRUE);
mMenu->setItemVisible("sort_folders_by_name", TRUE);
LLOutfitListGearMenuBase::onUpdateItemsVisibility();
}
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h
index 9915752962..d27352eb3b 100644
--- a/indra/newview/lloutfitgallery.h
+++ b/indra/newview/lloutfitgallery.h
@@ -202,7 +202,6 @@ protected:
/* virtual */ LLContextMenu* createMenu();
bool onEnable(LLSD::String param);
bool onVisible(LLSD::String param);
- void onThumbnail(const LLUUID& outfit_cat_id);
void onCreate(const LLSD& data);
private:
LLOutfitListBase* mOutfitList;
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 5c7792b0df..fbb442a992 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -1028,6 +1028,8 @@ LLContextMenu* LLOutfitContextMenu::createMenu()
registrar.add("Outfit.Edit", boost::bind(editOutfit));
registrar.add("Outfit.Rename", boost::bind(renameOutfit, selected_id));
registrar.add("Outfit.Delete", boost::bind(&LLOutfitListBase::removeSelected, mOutfitList));
+ registrar.add("Outfit.Thumbnail", boost::bind(&LLOutfitContextMenu::onThumbnail, this, selected_id));
+ registrar.add("Outfit.Save", boost::bind(&LLOutfitContextMenu::onSave, this, selected_id));
enable_registrar.add("Outfit.OnEnable", boost::bind(&LLOutfitContextMenu::onEnable, this, _2));
enable_registrar.add("Outfit.OnVisible", boost::bind(&LLOutfitContextMenu::onVisible, this, _2));
@@ -1092,6 +1094,31 @@ void LLOutfitContextMenu::renameOutfit(const LLUUID& outfit_cat_id)
LLAppearanceMgr::instance().renameOutfit(outfit_cat_id);
}
+void LLOutfitContextMenu::onThumbnail(const LLUUID &outfit_cat_id)
+{
+ if (outfit_cat_id.notNull())
+ {
+ LLSD data(outfit_cat_id);
+ LLFloaterReg::showInstance("change_item_thumbnail", data);
+ }
+}
+
+void LLOutfitContextMenu::onSave(const LLUUID &outfit_cat_id)
+{
+ if (outfit_cat_id.notNull())
+ {
+ LLNotificationsUtil::add("ConfirmOverwriteOutfit", LLSD(), LLSD(),
+ [outfit_cat_id](const LLSD &notif, const LLSD &resp)
+ {
+ S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+ if (opt == 0)
+ {
+ LLAppearanceMgr::getInstance()->onOutfitFolderCreated(outfit_cat_id, true);
+ }
+ });
+ }
+}
+
LLOutfitListGearMenuBase::LLOutfitListGearMenuBase(LLOutfitListBase* olist)
: mOutfitList(olist),
mMenu(NULL)
@@ -1110,6 +1137,7 @@ LLOutfitListGearMenuBase::LLOutfitListGearMenuBase(LLOutfitListBase* olist)
registrar.add("Gear.Expand", boost::bind(&LLOutfitListBase::onExpandAllFolders, mOutfitList));
registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenuBase::onAdd, this));
+ registrar.add("Gear.Save", boost::bind(&LLOutfitListGearMenuBase::onSave, this));
registrar.add("Gear.Thumbnail", boost::bind(&LLOutfitListGearMenuBase::onThumbnail, this));
registrar.add("Gear.SortByName", boost::bind(&LLOutfitListGearMenuBase::onChangeSortOrder, this));
@@ -1135,8 +1163,7 @@ void LLOutfitListGearMenuBase::onUpdateItemsVisibility()
if (!mMenu) return;
bool have_selection = getSelectedOutfitID().notNull();
- mMenu->setItemVisible("sepatator1", have_selection);
- mMenu->setItemVisible("sepatator2", have_selection);
+ mMenu->setItemVisible("wear_separator", have_selection);
mMenu->arrangeAndClear(); // update menu height
}
@@ -1181,6 +1208,20 @@ void LLOutfitListGearMenuBase::onAdd()
}
}
+void LLOutfitListGearMenuBase::onSave()
+{
+ const LLUUID &selected_id = getSelectedOutfitID();
+ LLNotificationsUtil::add("ConfirmOverwriteOutfit", LLSD(), LLSD(),
+ [selected_id](const LLSD &notif, const LLSD &resp)
+ {
+ S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+ if (opt == 0)
+ {
+ LLAppearanceMgr::getInstance()->onOutfitFolderCreated(selected_id, true);
+ }
+ });
+}
+
void LLOutfitListGearMenuBase::onTakeOff()
{
// Take off selected outfit.
@@ -1234,15 +1275,6 @@ bool LLOutfitListGearMenuBase::onVisible(LLSD::String param)
return false;
}
- // *TODO This condition leads to menu item behavior inconsistent with
- // "Wear" button behavior and should be modified or removed.
- bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == selected_outfit_id;
-
- if ("wear" == param)
- {
- return !is_worn;
- }
-
return true;
}
@@ -1270,8 +1302,7 @@ void LLOutfitListGearMenu::onUpdateItemsVisibility()
if (!mMenu) return;
mMenu->setItemVisible("expand", TRUE);
mMenu->setItemVisible("collapse", TRUE);
- mMenu->setItemVisible("thumbnail", FALSE); // Never visible?
- mMenu->setItemVisible("sepatator3", FALSE);
+ mMenu->setItemVisible("thumbnail", getSelectedOutfitID().notNull());
mMenu->setItemVisible("sort_folders_by_name", FALSE);
LLOutfitListGearMenuBase::onUpdateItemsVisibility();
}
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 66b3165169..49f77e945d 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -147,6 +147,9 @@ protected:
static void renameOutfit(const LLUUID& outfit_cat_id);
+ void onThumbnail(const LLUUID &outfit_cat_id);
+ void onSave(const LLUUID &outfit_cat_id);
+
private:
LLOutfitListBase* mOutfitList;
};
@@ -178,6 +181,7 @@ private:
void onAdd();
void onTakeOff();
void onRename();
+ void onSave();
void onCreate(const LLSD& data);
bool onEnable(LLSD::String param);
bool onVisible(LLSD::String param);
diff --git a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
index d82c453e5f..8cf0479b27 100644
--- a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
@@ -35,7 +35,7 @@
layout="topleft"
name="Folder Wearables Separator" />
<menu_item_call
- label="Replace Current Outfit"
+ label="Replace current outfit"
layout="topleft"
name="Replace Outfit">
<menu_item_call.on_click
@@ -43,7 +43,7 @@
parameter="replaceoutfit" />
</menu_item_call>
<menu_item_call
- label="Add To Current Outfit"
+ label="Add folder items"
layout="topleft"
name="Add To Outfit">
<menu_item_call.on_click
@@ -51,7 +51,7 @@
parameter="addtooutfit" />
</menu_item_call>
<menu_item_call
- label="Remove From Current Outfit"
+ label="Take off folder items"
layout="topleft"
name="Remove From Outfit">
<menu_item_call.on_click
diff --git a/indra/newview/skins/default/xui/en/menu_gallery_outfit_tab.xml b/indra/newview/skins/default/xui/en/menu_gallery_outfit_tab.xml
index 0ca505dd5d..c93a92b2b7 100755
--- a/indra/newview/skins/default/xui/en/menu_gallery_outfit_tab.xml
+++ b/indra/newview/skins/default/xui/en/menu_gallery_outfit_tab.xml
@@ -3,7 +3,7 @@
layout="topleft"
name="Outfit">
<menu_item_call
- label="Wear - Replace Current Outfit"
+ label="Replace current outfit"
layout="topleft"
name="wear_replace">
<on_click
@@ -16,7 +16,7 @@
parameter="wear_replace" />
</menu_item_call>
<menu_item_call
- label="Wear - Add to Current Outfit"
+ label="Add outfit items"
layout="topleft"
name="wear_add">
<on_click
@@ -29,7 +29,7 @@
parameter="wear_add" />
</menu_item_call>
<menu_item_call
- label="Take Off - Remove from Current Outfit"
+ label="Take off outfit items"
layout="topleft"
name="take_off">
<on_click
@@ -41,17 +41,60 @@
function="Outfit.OnVisible"
parameter="take_off" />
</menu_item_call>
+ <menu_item_separator/>
<menu_item_call
- label="Image..."
- layout="topleft"
- name="thumbnail">
+ label="Image..."
+ layout="topleft"
+ name="thumbnail">
+ <on_click
+ function="Outfit.Thumbnail" />
+ </menu_item_call>
+ <menu_item_call
+ label="Edit outfit"
+ layout="topleft"
+ name="edit">
+ <on_click
+ function="Outfit.Edit" />
+ <on_visible
+ function="Outfit.OnVisible"
+ parameter="edit" />
+ </menu_item_call>
+ <menu_item_call
+ label="Rename outfit"
+ layout="topleft"
+ name="rename">
+ <on_click
+ function="Outfit.Rename" />
+ <on_enable
+ function="Outfit.OnEnable"
+ parameter="rename" />
+ </menu_item_call>
+ <menu_item_call
+ label="Save to this outfit"
+ layout="topleft"
+ name="save">
+ <on_click
+ function="Outfit.Save" />
+ </menu_item_call>
+ <menu_item_separator>
+ <on_visible
+ function="Outfit.OnVisible"
+ parameter="delete" />
+ </menu_item_separator>
+ <menu_item_call
+ label="Delete outfit"
+ layout="topleft"
+ name="delete">
<on_click
- function="Outfit.Thumbnail" />
+ function="Outfit.Delete" />
+ <on_visible
+ function="Outfit.OnVisible"
+ parameter="delete" />
</menu_item_call>
- <menu_item_separator name="sepatator1" />
+ <menu_item_separator/>
<menu
height="175"
- label="New Clothes"
+ label="New clothes"
layout="topleft"
left_delta="0"
mouse_opaque="false"
@@ -157,7 +200,7 @@
</menu>
<menu
height="85"
- label="New Body Parts"
+ label="New body parts"
layout="topleft"
left_delta="0"
mouse_opaque="false"
@@ -197,35 +240,4 @@
parameter="eyes" />
</menu_item_call>
</menu>
- <menu_item_separator name="sepatator2" />
- <menu_item_call
- label="Edit Outfit"
- layout="topleft"
- name="edit">
- <on_click
- function="Outfit.Edit" />
- <on_visible
- function="Outfit.OnVisible"
- parameter="edit" />
- </menu_item_call>
- <menu_item_call
- label="Rename Outfit"
- layout="topleft"
- name="rename">
- <on_click
- function="Outfit.Rename" />
- <on_enable
- function="Outfit.OnEnable"
- parameter="rename" />
- </menu_item_call>
- <menu_item_call
- label="Delete Outfit"
- layout="topleft"
- name="delete">
- <on_click
- function="Outfit.Delete" />
- <on_visible
- function="Outfit.OnVisible"
- parameter="delete" />
- </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index e650c10603..b8adafbaaf 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -272,7 +272,7 @@
layout="topleft"
name="Folder Wearables Separator" />
<menu_item_call
- label="Replace Current Outfit"
+ label="Replace current outfit"
layout="topleft"
name="Replace Outfit">
<menu_item_call.on_click
@@ -280,7 +280,7 @@
parameter="replaceoutfit" />
</menu_item_call>
<menu_item_call
- label="Add To Current Outfit"
+ label="Add folder items"
layout="topleft"
name="Add To Outfit">
<menu_item_call.on_click
@@ -288,7 +288,7 @@
parameter="addtooutfit" />
</menu_item_call>
<menu_item_call
- label="Remove From Current Outfit"
+ label="Take off folder items"
layout="topleft"
name="Remove From Outfit">
<menu_item_call.on_click
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 e216962d12..e7a453766b 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
@@ -4,7 +4,7 @@
visible="false"
name="Gear Outfit">
<menu_item_call
- label="Wear - Replace Current Outfit"
+ label="Replace current outfit"
layout="topleft"
name="wear">
<on_click
@@ -17,7 +17,7 @@
parameter="wear" />
</menu_item_call>
<menu_item_call
- label="Wear - Add to Current Outfit"
+ label="Add outfit items"
layout="topleft"
name="wear_add">
<on_click
@@ -25,9 +25,11 @@
<on_enable
function="Gear.OnEnable"
parameter="wear_add" />
+ <on_visible
+ function="Gear.OnVisible"/>
</menu_item_call>
<menu_item_call
- label="Take Off - Remove from Current Outfit"
+ label="Take off outfit items"
layout="topleft"
name="take_off">
<on_click
@@ -39,19 +41,88 @@
function="Gear.OnVisible"
parameter="take_off" />
</menu_item_call>
+ <menu_item_separator name="wear_separator" />
<menu_item_call
label="Image..."
layout="topleft"
name="thumbnail">
+ <on_click
+ function="Gear.Thumbnail" />
+ </menu_item_call>
+ <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="Save to this outfit"
+ layout="topleft"
+ name="save">
+ <on_click
+ function="Gear.Save" />
+ <on_visible
+ function="Gear.OnVisible"/>
+ </menu_item_call>
+ <menu_item_separator>
+ <on_visible
+ function="Gear.OnVisible"
+ parameter="delete" />
+ </menu_item_separator>
+ <menu_item_call
+ label="Delete outfit"
+ layout="topleft"
+ name="delete_outfit">
+ <on_click
+ function="Gear.Delete" />
+ <on_enable
+ function="Gear.OnEnable"
+ parameter="delete" />
+ <on_visible
+ function="Gear.OnVisible"
+ parameter="delete" />
+ </menu_item_call>
+ <menu_item_separator>
+ <on_visible
+ function="Gear.OnVisible"/>
+ </menu_item_separator>
+ <menu_item_check
+ label="Sort folders always by name"
+ layout="topleft"
+ name="sort_folders_by_name">
+ <on_click
+ function="Gear.SortByName" />
+ <on_check
+ function="CheckControl"
+ parameter="OutfitGallerySortByName" />
+ </menu_item_check>
+ <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.Thumbnail" />
+ function="Gear.Collapse" />
</menu_item_call>
- <menu_item_separator name="sepatator1" />
+ <menu_item_separator/>
<!-- copied (with minor modifications) from menu_inventory_add.xml -->
<!-- *TODO: generate dynamically? -->
<menu
height="175"
- label="New Clothes"
+ label="New clothes"
layout="topleft"
left_delta="0"
mouse_opaque="false"
@@ -165,7 +236,7 @@
</menu>
<menu
height="85"
- label="New Body Parts"
+ label="New body parts"
layout="topleft"
left_delta="0"
mouse_opaque="false"
@@ -206,57 +277,4 @@
</menu_item_call>
</menu>
<!-- copied from menu_inventory_add.xml -->
-
- <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">
- <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">
- <on_click
- function="Gear.Delete" />
- <on_enable
- function="Gear.OnEnable"
- parameter="delete" />
- <on_visible
- function="Gear.OnVisible"
- parameter="delete" />
- </menu_item_call>
- <menu_item_separator name="sepatator3" />
- <menu_item_check
- label="Sort Folders Always by Name"
- layout="topleft"
- name="sort_folders_by_name">
- <on_click
- function="Gear.SortByName" />
- <on_check
- function="CheckControl"
- parameter="OutfitGallerySortByName" />
- </menu_item_check>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
index 8c8bb29baf..522e41df42 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
@@ -3,7 +3,7 @@
layout="topleft"
name="Outfit">
<menu_item_call
- label="Wear - Replace Current Outfit"
+ label="Replace current outfit"
layout="topleft"
name="wear_replace">
<on_click
@@ -16,7 +16,7 @@
parameter="wear_replace" />
</menu_item_call>
<menu_item_call
- label="Wear - Add to Current Outfit"
+ label="Add outfit items"
layout="topleft"
name="wear_add">
<on_click
@@ -29,7 +29,7 @@
parameter="wear_add" />
</menu_item_call>
<menu_item_call
- label="Take Off - Remove from Current Outfit"
+ label="Take off outfit items"
layout="topleft"
name="take_off">
<on_click
@@ -41,19 +41,26 @@
function="Outfit.OnVisible"
parameter="take_off" />
</menu_item_call>
+ <menu_item_separator />
<menu_item_call
- label="Edit Outfit"
- layout="topleft"
- name="edit">
+ label="Image..."
+ layout="topleft"
+ name="thumbnail">
+ <on_click
+ function="Outfit.Thumbnail" />
+ </menu_item_call>
+ <menu_item_call
+ label="Edit outfit"
+ layout="topleft"
+ name="edit">
<on_click
function="Outfit.Edit" />
<on_visible
function="Outfit.OnVisible"
parameter="edit" />
</menu_item_call>
- <menu_item_separator />
<menu_item_call
- label="Rename Outfit"
+ label="Rename outfit"
layout="topleft"
name="rename">
<on_click
@@ -63,7 +70,19 @@
parameter="rename" />
</menu_item_call>
<menu_item_call
- label="Delete Outfit"
+ label="Save to this outfit"
+ layout="topleft"
+ name="save">
+ <on_click
+ function="Outfit.Save" />
+ </menu_item_call>
+ <menu_item_separator>
+ <on_visible
+ function="Outfit.OnVisible"
+ parameter="delete" />
+ </menu_item_separator>
+ <menu_item_call
+ label="Delete outfit"
layout="topleft"
name="delete">
<on_click
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 204fead7e0..d0c73f0973 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -12098,5 +12098,21 @@ Would you like to save them first?
notext="No"
yestext="Yes"/>
</notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="ConfirmOverwriteOutfit"
+ type="alertmodal">
+ <unique/>
+This will replace the items in the
+selected outfit with the items you
+are wearing now.
+ <tag>confirm</tag>
+ <usetemplate
+ ignoretext="Confirm before overwriting outfit"
+ name="okcancelignore"
+ notext="Cancel"
+ yestext="Save"/>
+ </notification>
</notifications>