summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagentwearables.cpp8
-rw-r--r--indra/newview/llagentwearables.h6
-rw-r--r--indra/newview/llappearancemgr.cpp8
-rw-r--r--indra/newview/llviewermenu.cpp102
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Alpha.pngbin0 -> 253 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Tattoo.pngbin0 -> 253 bytes
-rw-r--r--indra/newview/skins/default/xui/en/floater_customize.xml31
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_people.xml22
9 files changed, 54 insertions, 134 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 8c76a219a0..3fc1055acd 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1392,6 +1392,7 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem
const LLUUID &item_id = getWearableItemID(type,i);
popWearable(type,i);
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
+ LLAppearanceManager::removeItemLinks(item_id,false);
//queryWearableCache(); // moved below
if (old_wearable)
@@ -1408,6 +1409,7 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem
const LLUUID &item_id = getWearableItemID(type,index);
popWearable(type, index);
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
+ LLAppearanceManager::removeItemLinks(item_id,false);
//queryWearableCache(); // moved below
@@ -1721,10 +1723,8 @@ void LLAgentWearables::queryWearableCache()
// MULTI_WEARABLE: need a way to specify by wearable rather than by type.
// User has picked "remove from avatar" from a menu.
// static
-void LLAgentWearables::userRemoveWearable(void* userdata)
+void LLAgentWearables::userRemoveWearable(EWearableType& type)
{
- EWearableType type = (EWearableType)(intptr_t)userdata;
-
if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR)) //&&
//!((!gAgent.isTeen()) && (type==WT_UNDERPANTS || type==WT_UNDERSHIRT)))
{
@@ -1734,7 +1734,7 @@ void LLAgentWearables::userRemoveWearable(void* userdata)
}
// static
-void LLAgentWearables::userRemoveAllClothes(void* userdata)
+void LLAgentWearables::userRemoveAllClothes()
{
// We have to do this up front to avoid having to deal with the case of multiple wearables being dirty.
if (gFloaterCustomize)
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 97de785c87..317f4a7e4f 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -191,9 +191,9 @@ public:
//--------------------------------------------------------------------
public:
// MULTI-WEARABLE: assuming one wearable per type. Need upstream changes.
- static void userRemoveWearable(void* userdata); // userdata is EWearableType
- static void userRemoveAllClothes(void* userdata); // userdata is NULL
-
+ static void userRemoveWearable(EWearableType& type);
+ static void userRemoveAllClothes();
+
typedef std::vector<LLViewerObject*> llvo_vec_t;
static void userUpdateAttachments(LLInventoryModel::item_array_t& obj_item_array);
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index a50b39c10d..41cd77b45d 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1103,14 +1103,16 @@ void LLAppearanceManager::wearItem( LLInventoryItem* item, bool do_update )
bool linked_already = false;
for (S32 i=0; i<item_array.count(); i++)
{
+ // Are these links to the same object?
const LLViewerInventoryItem* inv_item = item_array.get(i).get();
if (inv_item->getLinkedUUID() == item->getLinkedUUID())
{
linked_already = true;
- break;
}
- // Are of same type but are not the same - new item will replace old.
- if (areMatchingWearables(vitem,inv_item))
+ // Are these links to different items of the same wearable
+ // type? If so, new item will replace old.
+ // MULTI-WEARABLES: revisit if more than one per type is allowed.
+ else if (areMatchingWearables(vitem,inv_item))
{
gAgentWearables.removeWearable(inv_item->getWearableType(),true,0);
gInventory.purgeObject(inv_item->getUUID());
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 2c2b2047ca..d42c4372dc 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7457,52 +7457,10 @@ class LLEditEnableTakeOff : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
std::string clothing = userdata.asString();
- bool new_value = false;
- if (clothing == "shirt")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_SHIRT);
- }
- if (clothing == "pants")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_PANTS);
- }
- if (clothing == "shoes")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_SHOES);
- }
- if (clothing == "socks")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_SOCKS);
- }
- if (clothing == "jacket")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_JACKET);
- }
- if (clothing == "gloves")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_GLOVES);
- }
- if (clothing == "undershirt")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_UNDERSHIRT);
- }
- if (clothing == "underpants")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_UNDERPANTS);
- }
- if (clothing == "skirt")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_SKIRT);
- }
- if (clothing == "alpha")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_ALPHA);
- }
- if (clothing == "tattoo")
- {
- new_value = LLAgentWearables::selfHasWearable(WT_TATTOO);
- }
- return new_value;
+ EWearableType type = LLWearableDictionary::typeNameToType(clothing);
+ if (type >= WT_SHAPE && type < WT_COUNT)
+ return LLAgentWearables::selfHasWearable(type);
+ return false;
}
};
@@ -7511,53 +7469,13 @@ class LLEditTakeOff : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
std::string clothing = userdata.asString();
- if (clothing == "shirt")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_SHIRT);
- }
- else if (clothing == "pants")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_PANTS);
- }
- else if (clothing == "shoes")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_SHOES);
- }
- else if (clothing == "socks")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_SOCKS);
- }
- else if (clothing == "jacket")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_JACKET);
- }
- else if (clothing == "gloves")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_GLOVES);
- }
- else if (clothing == "undershirt")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_UNDERSHIRT);
- }
- else if (clothing == "underpants")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_UNDERPANTS);
- }
- else if (clothing == "skirt")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_SKIRT);
- }
- else if (clothing == "alpha")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_ALPHA);
- }
- else if (clothing == "tattoo")
- {
- LLAgentWearables::userRemoveWearable((void*)WT_TATTOO);
- }
- else if (clothing == "all")
+ if (clothing == "all")
+ LLAgentWearables::userRemoveAllClothes();
+ else
{
- LLAgentWearables::userRemoveAllClothes(NULL);
+ EWearableType type = LLWearableDictionary::typeNameToType(clothing);
+ if (type >= WT_SHAPE && type < WT_COUNT)
+ LLAgentWearables::userRemoveWearable(type);
}
return true;
}
diff --git a/indra/newview/skins/default/textures/icons/Inv_Alpha.png b/indra/newview/skins/default/textures/icons/Inv_Alpha.png
new file mode 100644
index 0000000000..e8d246c6fa
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_Alpha.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Tattoo.png b/indra/newview/skins/default/textures/icons/Inv_Tattoo.png
new file mode 100644
index 0000000000..e8d246c6fa
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_Tattoo.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/en/floater_customize.xml b/indra/newview/skins/default/xui/en/floater_customize.xml
index c021dd79de..f54b6eecfb 100644
--- a/indra/newview/skins/default/xui/en/floater_customize.xml
+++ b/indra/newview/skins/default/xui/en/floater_customize.xml
@@ -193,7 +193,7 @@
font="SansSerif"
height="16"
layout="topleft"
- left="26"
+ left="8"
name="title"
top="8"
width="355">
@@ -299,7 +299,7 @@ scratch and wear it.
left="8"
name="Create New"
top="104"
- width="120" />
+ width="140" />
<button
follows="right|bottom"
height="20"
@@ -342,9 +342,10 @@ scratch and wear it.
top="4"
width="18" />
<icon
+ follows="left|top"
height="16"
layout="topleft"
- left_delta="-325"
+ left="8"
mouse_opaque="true"
top_delta="3"
width="16" />
@@ -399,7 +400,7 @@ scratch and wear it.
font="SansSerif"
height="16"
layout="topleft"
- left="26"
+ left="8"
name="title"
top="8"
width="355">
@@ -599,7 +600,7 @@ scratch and wear it.
<icon
height="16"
layout="topleft"
- left_delta="-325"
+ left="8"
mouse_opaque="true"
top_delta="3"
width="16" />
@@ -654,7 +655,7 @@ scratch and wear it.
font="SansSerif"
height="16"
layout="topleft"
- left="26"
+ left="8"
name="title"
top="8"
width="355">
@@ -1015,7 +1016,7 @@ scratch and wear it.
<icon
height="16"
layout="topleft"
- left_delta="-325"
+ left="8"
mouse_opaque="true"
top_delta="3"
width="16" />
@@ -1100,7 +1101,7 @@ scratch and wear it.
font="SansSerif"
height="16"
layout="topleft"
- left="26"
+ left="8"
name="title"
top="8"
width="355">
@@ -1221,7 +1222,7 @@ scratch and wear it.
<icon
height="16"
layout="topleft"
- left_delta="-325"
+ left="8"
mouse_opaque="true"
top_delta="3"
width="16" />
@@ -1306,7 +1307,7 @@ scratch and wear it.
font="SansSerif"
height="16"
layout="topleft"
- left="26"
+ left="8"
name="title"
top="8"
width="355">
@@ -3378,16 +3379,6 @@ scratch and wear it.
layout="topleft"
name="panel_list" />
</scroll_container>
- <button
- bottom="536"
- follows="right|bottom"
- height="20"
- label="Make Outfit"
- label_selected="Make Outfit"
- layout="topleft"
- name="make_outfit_btn"
- right="-216"
- width="100" />
<button
bottom="536"
follows="right|bottom"
diff --git a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml
index 2bec745410..6dd44255bf 100644
--- a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml
@@ -13,4 +13,15 @@
function="CheckControl"
parameter="GroupListShowIcons" />
</menu_item_check>
+ <menu_item_check
+ label="Leave Selected Group"
+ layout="topleft"
+ name="Leave Selected Group">
+ <menu_item_check.on_click
+ function="People.Groups.ViewSort.Action"
+ parameter="show_icons" />
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="GroupListShowIcons" />
+ </menu_item_check>
</menu>
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index c8194a286b..ed21c5cc6c 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -95,6 +95,7 @@ background_visible="true"
layout="topleft"
left="10"
name="nearby_view_sort_btn"
+ picture_style="true"
top="5"
width="18" />
<button
@@ -106,6 +107,7 @@ background_visible="true"
layout="topleft"
left_pad="5"
name="add_friend_btn"
+ picture_style="true"
top_delta="0"
tool_tip="Add selected resident to your friends List"
width="18" />
@@ -181,6 +183,7 @@ background_visible="true"
layout="topleft"
left="10"
name="friends_viewsort_btn"
+ picture_style="true"
top="5"
width="18" />
<button
@@ -192,6 +195,7 @@ background_visible="true"
layout="topleft"
left_pad="5"
name="add_btn"
+ picture_style="true"
tool_tip="Offer friendship to a resident"
top_delta="0"
width="18" />
@@ -205,6 +209,7 @@ background_visible="true"
left_pad="10"
right="-10"
name="del_btn"
+ picture_style="true"
tool_tip="Remove selected person from your Friends list"
top_delta="0"
width="18" />
@@ -247,6 +252,7 @@ background_visible="true"
layout="topleft"
left="10"
name="groups_viewsort_btn"
+ picture_style="true"
top="7"
width="18" />
<button
@@ -258,6 +264,7 @@ background_visible="true"
layout="topleft"
left_pad="5"
name="plus_btn"
+ picture_style="true"
tool_tip="Join group/Create new group"
top_delta="0"
width="18" />
@@ -270,21 +277,10 @@ background_visible="true"
layout="topleft"
left_pad="24"
name="activate_btn"
+ picture_style="true"
tool_tip="Activate selected group"
top_delta="5"
width="10" />
- <button
- follows="bottom|left"
- height="18"
- image_selected="TrashItem_Press"
- image_unselected="TrashItem_Off"
- layout="topleft"
- left_pad="10"
- right="-10"
- name="minus_btn"
- tool_tip="Leave selected group"
- top_delta="-5"
- width="18" />
</panel>
</panel>
<panel
@@ -327,6 +323,7 @@ background_visible="true"
layout="topleft"
left="10"
name="recent_viewsort_btn"
+ picture_style="true"
top="7"
width="18" />
<button
@@ -338,6 +335,7 @@ background_visible="true"
layout="topleft"
left_pad="5"
name="add_friend_btn"
+ picture_style="true"
top_delta="0"
tool_tip="Add selected resident to your friends List"
width="18" />