summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-04-21 18:31:56 +0300
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-04-21 18:31:56 +0300
commita1d86ca8ab961eb35bfd62a7b7f1ba17d807efd4 (patch)
treecd72ffade5d930f8d81d623a4f3e3de2a3df5131 /indra
parent6d0c07840c6eae4f854152da051c46b9320ea0dd (diff)
SL-19379 update for gallery context menu
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorygallerymenu.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index 84b18c1517..43ddf4da63 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -334,6 +334,10 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata, const LLU
gInventory.updateItem(item);
gInventory.notifyObservers();
}
+ else if ("replace_links" == action)
+ {
+ LLFloaterReg::showInstance("linkreplace", LLSD(selected_id));
+ }
}
void LLInventoryGalleryContextMenu::onRename(const LLSD& notification, const LLSD& response)
@@ -451,8 +455,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
if(!is_link)
{
items.push_back(std::string("thumbnail"));
- LLViewerInventoryItem* inv_item = gInventory.getItem(selected_id);
- if (inv_item && !inv_item->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID()))
+ if (!is_agent_inventory)
{
disabled_items.push_back(std::string("thumbnail"));
}
@@ -466,6 +469,13 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
items.push_back(std::string("open_in_new_window"));
items.push_back(std::string("Open Folder Separator"));
}
+ else
+ {
+ if (is_agent_inventory && (obj->getType() != LLAssetType::AT_LINK_FOLDER))
+ {
+ items.push_back(std::string("Replace Links"));
+ }
+ }
if(is_trash)
{
@@ -490,7 +500,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
}
}
items.push_back(std::string("Purge Item"));
- if (!get_is_category_removable(&gInventory, selected_id))
+ if (is_folder && !get_is_category_removable(&gInventory, selected_id))
{
disabled_items.push_back(std::string("Purge Item"));
}