summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml15
-rw-r--r--indra/newview/llagentwearables.cpp9
-rw-r--r--indra/newview/llinventorybridge.cpp13
-rw-r--r--indra/newview/llselectmgr.cpp7
-rw-r--r--indra/newview/llviewermessage.cpp10
-rw-r--r--indra/newview/llwearableitemslist.cpp16
-rw-r--r--indra/newview/skins/default/xui/en/menu_wearable_list_item.xml6
7 files changed, 54 insertions, 22 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 1d635ef18a..d3cc5d6cb7 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5338,7 +5338,7 @@
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
- </map>
+ </map>
<key>MouseSun</key>
<map>
<key>Comment</key>
@@ -5350,7 +5350,18 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>MuteAmbient</key>
+ <key>MultipleAttachments</key>
+ <map>
+ <key>Comment</key>
+ <string>Allow multiple objects to be attached to a single attachment point.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>MuteAmbient</key>
<map>
<key>Comment</key>
<string>Ambient sound effects, such as wind noise, play at 0 volume</string>
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index bca92a60be..e70511ce6e 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1867,11 +1867,10 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra
msg->nextBlockFast(_PREHASH_ObjectData );
msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID());
msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner());
-#if ENABLE_MULTIATTACHMENTS
- msg->addU8Fast(_PREHASH_AttachmentPt, 0 | ATTACHMENT_ADD );
-#else
- msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point
-#endif
+ if (gSavedSettings.getBOOL("MultipleAttachments"))
+ msg->addU8Fast(_PREHASH_AttachmentPt, 0 | ATTACHMENT_ADD );
+ else
+ msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point
pack_permissions_slam(msg, item->getFlags(), item->getPermissions());
msg->addStringFast(_PREHASH_Name, item->getName());
msg->addStringFast(_PREHASH_Description, item->getDescription());
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index a5f24c55fe..bc28140b75 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3963,13 +3963,12 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
payload["attachment_point"] = attach_pt;
-#if !ENABLE_MULTIATTACHMENTS
- if (attachment && attachment->getNumObjects() > 0)
+ if (!gSavedSettings.getBOOL("MultipleAttachments") &&
+ (attachment && attachment->getNumObjects() > 0))
{
LLNotificationsUtil::add("ReplaceAttachment", LLSD(), payload, confirm_replace_attachment_rez);
}
else
-#endif
{
LLNotifications::instance().forceResponse(LLNotification::Params("ReplaceAttachment").payload(payload), 0/*YES*/);
}
@@ -3992,6 +3991,10 @@ bool confirm_replace_attachment_rez(const LLSD& notification, const LLSD& respon
if (itemp)
{
+ U8 attachment_pt = notification["payload"]["attachment_point"].asInteger();
+ if (gSavedSettings.getBOOL("MultipleAttachments"))
+ attachment_pt |= ATTACHMENT_ADD;
+
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_RezSingleAttachmentFromInv);
msg->nextBlockFast(_PREHASH_AgentData);
@@ -4000,10 +4003,6 @@ bool confirm_replace_attachment_rez(const LLSD& notification, const LLSD& respon
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addUUIDFast(_PREHASH_ItemID, itemp->getUUID());
msg->addUUIDFast(_PREHASH_OwnerID, itemp->getPermissions().getOwner());
- U8 attachment_pt = notification["payload"]["attachment_point"].asInteger();
-#if ENABLE_MULTIATTACHMENTS
- attachment_pt |= ATTACHMENT_ADD;
-#endif
msg->addU8Fast(_PREHASH_AttachmentPt, attachment_pt);
pack_permissions_slam(msg, itemp->getFlags(), itemp->getPermissions());
msg->addStringFast(_PREHASH_Name, itemp->getName());
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index af16b962e6..050b87bbe0 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -3629,9 +3629,10 @@ void LLSelectMgr::sendAttach(U8 attachment_point)
if (0 == attachment_point ||
get_if_there(gAgentAvatarp->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL))
{
-#if ENABLE_MULTIATTACHMENTS
- attachment_point |= ATTACHMENT_ADD;
-#endif
+
+ if (gSavedSettings.getBOOL("MultipleAttachments"))
+ attachment_point |= ATTACHMENT_ADD;
+
sendListToRegions(
"ObjectAttach",
packAgentIDAndSessionAndAttachment,
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index bf4eb6ec33..07b6431c92 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1167,12 +1167,12 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
}
////////////////////////////////////////////////////////////////////////////////
- // Highlight item if it's not in the trash, lost+found, or COF
+ // Highlight item
const BOOL auto_open =
- gSavedSettings.getBOOL("ShowInInventory") &&
- (asset_type != LLAssetType::AT_CALLINGCARD) &&
- !(item && item->getInventoryType() != LLInventoryType::IT_ATTACHMENT) &&
- !from_name.empty();
+ gSavedSettings.getBOOL("ShowInInventory") && // don't open if showininventory is false
+ !(asset_type == LLAssetType::AT_CALLINGCARD) && // don't open if it's a calling card
+ !(item && (item->getInventoryType() == LLInventoryType::IT_ATTACHMENT)) && // don't open if it's an item that's an attachment
+ !from_name.empty(); // don't open if it's not from anyone.
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
if(active_panel)
{
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 6bb3e7fb64..cf165f8f66 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -674,6 +674,8 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu
setMenuItemEnabled(menu, "take_off_or_detach", n_worn == n_items);
setMenuItemVisible(menu, "object_profile", !standalone);
setMenuItemEnabled(menu, "object_profile", n_items == 1);
+ setMenuItemVisible(menu, "--no options--", FALSE);
+ setMenuItemEnabled(menu, "--no options--", FALSE);
// Populate or hide the "Attach to..." / "Attach to HUD..." submenus.
if (mask == MASK_ATTACHMENT && n_worn == 0)
@@ -690,6 +692,20 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu
{
llwarns << "Non-wearable items passed." << llendl;
}
+
+ U32 num_visible_items = 0;
+ for (U32 menu_item_index = 0; menu_item_index < menu->getItemCount(); ++menu_item_index)
+ {
+ const LLMenuItemGL* menu_item = menu->getItem(menu_item_index);
+ if (menu_item && menu_item->getVisible())
+ {
+ num_visible_items++;
+ }
+ }
+ if (num_visible_items == 0)
+ {
+ setMenuItemVisible(menu, "--no options--", TRUE);
+ }
}
void LLWearableItemsList::ContextMenu::updateItemsLabels(LLContextMenu* menu)
diff --git a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml
index efea2ae3e8..23eb89e448 100644
--- a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml
+++ b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml
@@ -73,4 +73,10 @@
<on_click
function="Wearable.CreateNew" />
</menu_item_call>
+ <menu_item_call
+ label="--no options--"
+ layout="topleft"
+ name="--no options--"
+ translate="false">
+ </menu_item_call>
</context_menu>