summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorAnsariel <none@none>2017-04-27 19:19:11 +0200
committerAnsariel <none@none>2017-04-27 19:19:11 +0200
commitb59ac959fcf2f1f0435f965d2c7279f529f1ce5c (patch)
treedc3383bbb92181483baae1394c93e7fcda534d4b /indra/newview/llinventorybridge.cpp
parentd65e6e83821bf134805282e5c2ff66f76c819fe6 (diff)
MAINT-6519 Contribution, adds feature to replace inventory links
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 555c19baac..bf4a2301ae 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -851,6 +851,7 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
getClipboardEntries(true, items, disabled_items, flags);
}
+ addLinkReplaceMenuOption(items, disabled_items);
hide_context_entries(menu, items, disabled_items);
}
@@ -1051,6 +1052,20 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags,
items.push_back(std::string("Marketplace Listings Separator"));
}
+void LLInvFVBridge::addLinkReplaceMenuOption(menuentry_vec_t& items, menuentry_vec_t& disabled_items)
+{
+ const LLInventoryObject* obj = getInventoryObject();
+
+ if (isAgentInventory() && obj && obj->getType() != LLAssetType::AT_CATEGORY && obj->getType() != LLAssetType::AT_LINK_FOLDER)
+ {
+ items.push_back(std::string("Replace Links"));
+
+ if (mRoot->getSelectedCount() != 1)
+ {
+ disabled_items.push_back(std::string("Replace Links"));
+ }
+ }
+}
// *TODO: remove this
BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
@@ -5179,6 +5194,7 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
disabled_items.push_back(std::string("Save As"));
}
}
+ addLinkReplaceMenuOption(items, disabled_items);
hide_context_entries(menu, items, disabled_items);
}
@@ -5251,6 +5267,7 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Sound Play"));
}
+ addLinkReplaceMenuOption(items, disabled_items);
hide_context_entries(menu, items, disabled_items);
}
@@ -5339,6 +5356,7 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
disabled_items.push_back(std::string("About Landmark"));
}
+ addLinkReplaceMenuOption(items, disabled_items);
hide_context_entries(menu, items, disabled_items);
}
@@ -5641,6 +5659,7 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
disabled_items.push_back(std::string("Conference Chat"));
}
}
+ addLinkReplaceMenuOption(items, disabled_items);
hide_context_entries(menu, items, disabled_items);
}
@@ -5910,6 +5929,7 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Activate"));
}
}
+ addLinkReplaceMenuOption(items, disabled_items);
hide_context_entries(menu, items, disabled_items);
}
@@ -5967,6 +5987,7 @@ void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Animation Audition"));
}
+ addLinkReplaceMenuOption(items, disabled_items);
hide_context_entries(menu, items, disabled_items);
}
@@ -6283,6 +6304,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
}
}
+ addLinkReplaceMenuOption(items, disabled_items);
hide_context_entries(menu, items, disabled_items);
}
@@ -6511,6 +6533,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
}
}
+ addLinkReplaceMenuOption(items, disabled_items);
hide_context_entries(menu, items, disabled_items);
}
@@ -6682,6 +6705,7 @@ void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Properties"));
addDeleteContextMenuOptions(items, disabled_items);
}
+ addLinkReplaceMenuOption(items, disabled_items);
hide_context_entries(menu, items, disabled_items);
}
@@ -6733,6 +6757,7 @@ void LLMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
getClipboardEntries(true, items, disabled_items, flags);
}
+ addLinkReplaceMenuOption(items, disabled_items);
hide_context_entries(menu, items, disabled_items);
}