diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 2d036735bc..f1aa141d2e 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -142,6 +142,26 @@ bool isMarketplaceSendAction(const std::string& action)
return ("send_to_marketplace" == action);
}
+// Submenus grouping
+namespace
+{
+ constexpr bool is_context_submenu_branch(std::string_view name)
+ {
+ return (name == "More") || (name == "create_new") || (name == INVENTORY_SUBMENU_MARKETPLACE) || (name == INVENTORY_SUBMENU_LINKS);
+ }
+}
+
+void add_context_submenu_entry(menuentry_vec_t& items, std::string_view submenu, std::string_view item)
+{
+ const auto submenu_it = std::find(items.cbegin(), items.cend(), submenu);
+ if (submenu_it == items.cend())
+ {
+ items.emplace_back(submenu);
+ }
+ items.emplace_back(item);
+}
+//
+
bool isPanelActive(const std::string& panel_name)
{
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(false);
@@ -763,7 +783,10 @@ void disable_context_entries_if_present(LLMenuGL& menu,
// descend into split menus:
LLMenuItemBranchGL* branchp = dynamic_cast(menu_item);
- if ((name == "More") && branchp)
+ // Submenus grouping
+ // if ((name == "More") && branchp)
+ if (is_context_submenu_branch(name) && branchp)
+ //
{
disable_context_entries_if_present(*branchp->getBranch(), disabled_entries);
}
@@ -809,7 +832,10 @@ void hide_context_entries(LLMenuGL& menu,
// descend into split menus:
LLMenuItemBranchGL* branchp = dynamic_cast(menu_item);
- if (((name == "More") || (name == "create_new")) && branchp)
+ // Submenus grouping
+ // if (((name == "More") || (name == "create_new")) && branchp)
+ if (is_context_submenu_branch(name) && branchp)
+ //
{
hide_context_entries(*branchp->getBranch(), entries_to_show, disabled_entries);
}
@@ -947,7 +973,10 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
{
if (LLAssetType::lookupCanLink(obj->getType()))
{
- items.push_back(std::string("Find Links"));
+ // Submenus grouping
+ // items.push_back(std::string("Find Links"));
+ add_context_submenu_entry(items, INVENTORY_SUBMENU_LINKS, "Find Links");
+ //
}
if (!is_inbox && !single_folder_root)
@@ -1000,12 +1029,17 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
if (canListOnMarketplace() && !isMarketplaceListingsFolder() && !isInboxFolder())
{
- items.push_back(std::string("Marketplace Separator"));
+ // Submenus grouping (line commented out)
+ // items.push_back(std::string("Marketplace Separator"));
if (gMenuHolder->getChild("MarketplaceListings")->getVisible())
{
- items.push_back(std::string("Marketplace Copy"));
- items.push_back(std::string("Marketplace Move"));
+ // Submenus grouping
+ // items.push_back(std::string("Marketplace Copy"));
+ // items.push_back(std::string("Marketplace Move"));
+ add_context_submenu_entry(items, INVENTORY_SUBMENU_MARKETPLACE, "Marketplace Copy");
+ add_context_submenu_entry(items, INVENTORY_SUBMENU_MARKETPLACE, "Marketplace Move");
+ //
if (!canListOnMarketplaceNow())
{
disabled_items.push_back(std::string("Marketplace Copy"));
@@ -1041,7 +1075,10 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
//
)
{
- items.push_back(std::string("Paste As Link"));
+ // Submenus grouping
+ // items.push_back(std::string("Paste As Link"));
+ add_context_submenu_entry(items, INVENTORY_SUBMENU_LINKS, "Paste As Link");
+ //
if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0)
{
disabled_items.push_back(std::string("Paste As Link"));
@@ -1192,6 +1229,7 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags,
menuentry_vec_t &items,
menuentry_vec_t &disabled_items)
{
+ items.emplace_back(INVENTORY_SUBMENU_MARKETPLACE); // Submenus grouping
S32 depth = depth_nesting_in_marketplace(mUUID);
if (depth == 1)
{
@@ -1310,7 +1348,8 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags,
}
// Separator
- items.push_back(std::string("Marketplace Listings Separator"));
+ // Submenus grouping (line commented out)
+ // items.push_back(std::string("Marketplace Listings Separator"));
}
void LLInvFVBridge::addLinkReplaceMenuOption(menuentry_vec_t& items, menuentry_vec_t& disabled_items)
@@ -1319,7 +1358,10 @@ void LLInvFVBridge::addLinkReplaceMenuOption(menuentry_vec_t& items, menuentry_v
if (isAgentInventory() && obj && obj->getType() != LLAssetType::AT_CATEGORY && obj->getType() != LLAssetType::AT_LINK_FOLDER)
{
- items.push_back(std::string("Replace Links"));
+ // Submenus grouping
+ // items.push_back(std::string("Replace Links"));
+ add_context_submenu_entry(items, INVENTORY_SUBMENU_LINKS, "Replace Links");
+ //
if (mRoot->getSelectedCount() != 1)
{
@@ -4931,7 +4973,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
// FIRE-11628: Option to delete broken links from AO folder
if (mUUID == AOEngine::instance().getAOFolder())
{
- items.push_back(std::string("Cleanup broken Links"));
+ add_context_submenu_entry(items, INVENTORY_SUBMENU_LINKS, "Cleanup broken Links");
}
//
@@ -5076,7 +5118,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
}
// FIRE-4595: Paste as Link missing for outfit folders
- items.push_back(std::string("Paste As Link"));
+ add_context_submenu_entry(items, INVENTORY_SUBMENU_LINKS, "Paste As Link");
if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0)
{
disabled_items.push_back(std::string("Paste As Link"));
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index e8b6f93710..d86f7aec3b 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -39,6 +39,8 @@
#include "llfolderviewitem.h"
#include "llsettingsbase.h"
+#include // Submenus grouping
+
class LLInventoryFilter;
class LLInventoryPanel;
class LLInventoryModel;
@@ -909,6 +911,12 @@ void hide_context_entries(LLMenuGL& menu,
const menuentry_vec_t &entries_to_show,
const menuentry_vec_t &disabled_entries);
+// Submenus grouping
+inline constexpr std::string_view INVENTORY_SUBMENU_MARKETPLACE{ "Marketplace" };
+inline constexpr std::string_view INVENTORY_SUBMENU_LINKS{ "Links" };
+void add_context_submenu_entry(menuentry_vec_t& items, std::string_view submenu, std::string_view item);
+//
+
// Helper functions to classify actions.
bool isAddAction(const std::string& action);
bool isRemoveAction(const std::string& action);
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index e82c318aad..9cf578316d 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -719,7 +719,10 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
{
if (is_agent_inventory && (obj->getType() != LLAssetType::AT_LINK_FOLDER))
{
- items.push_back(std::string("Replace Links"));
+ // Submenus grouping
+ // items.push_back(std::string("Replace Links"));
+ add_context_submenu_entry(items, INVENTORY_SUBMENU_LINKS, "Replace Links");
+ //
}
if (obj->getType() == LLAssetType::AT_LANDMARK)
{
@@ -790,7 +793,10 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
static LLCachedControl inventory_linking(gSavedSettings, "InventoryLinking", true);
if (inventory_linking)
{
- items.push_back(std::string("Paste As Link"));
+ // Submenus grouping
+ // items.push_back(std::string("Paste As Link"));
+ add_context_submenu_entry(items, INVENTORY_SUBMENU_LINKS, "Paste As Link");
+ //
if (selected_item)
{
@@ -1083,9 +1089,13 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
if (can_list)
{
- items.push_back(std::string("Marketplace Separator"));
- items.push_back(std::string("Marketplace Copy"));
- items.push_back(std::string("Marketplace Move"));
+ // Submenus grouping
+ // items.push_back(std::string("Marketplace Separator"));
+ // items.push_back(std::string("Marketplace Copy"));
+ // items.push_back(std::string("Marketplace Move"));
+ add_context_submenu_entry(items, INVENTORY_SUBMENU_MARKETPLACE, "Marketplace Copy");
+ add_context_submenu_entry(items, INVENTORY_SUBMENU_MARKETPLACE, "Marketplace Move");
+ //
if (!can_list_on_marketplace(selected_id))
{
diff --git a/indra/newview/skins/default/xui/az/menu_inventory.xml b/indra/newview/skins/default/xui/az/menu_inventory.xml
index ef226fe647..a563b64229 100644
--- a/indra/newview/skins/default/xui/az/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/az/menu_inventory.xml
@@ -1,14 +1,5 @@
diff --git a/indra/newview/skins/default/xui/de/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/de/menu_gallery_inventory.xml
index 6036bdc135..867af8ff35 100644
--- a/indra/newview/skins/default/xui/de/menu_gallery_inventory.xml
+++ b/indra/newview/skins/default/xui/de/menu_gallery_inventory.xml
@@ -23,8 +23,10 @@
-
-
+
+
+
+
@@ -100,7 +102,9 @@
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/de/menu_inventory.xml b/indra/newview/skins/default/xui/de/menu_inventory.xml
index cf1ab53d53..8ce67529be 100644
--- a/indra/newview/skins/default/xui/de/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/de/menu_inventory.xml
@@ -1,14 +1,5 @@
-
-
-
-
-
-
-
-
-
@@ -98,11 +89,13 @@
-
-
-
+
+
+
+
+
+
-
@@ -141,7 +134,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
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 25e3afe264..af71e736d9 100644
--- a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
@@ -197,6 +197,10 @@
function="Inventory.DoToSelected"
parameter="paste" />
+
+
@@ -841,9 +846,10 @@
parameter="def_pbr_material" />
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
@@ -823,14 +761,6 @@
function="Inventory.DoToSelected"
parameter="delete" />
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
@@ -85,7 +76,9 @@
-
+
+
+
@@ -111,7 +104,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/fr/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/fr/menu_gallery_inventory.xml
index e36cc2dc7a..79de57e7de 100644
--- a/indra/newview/skins/default/xui/fr/menu_gallery_inventory.xml
+++ b/indra/newview/skins/default/xui/fr/menu_gallery_inventory.xml
@@ -22,8 +22,10 @@
-
-
+
+
+
+
@@ -60,7 +62,9 @@
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/fr/menu_inventory.xml b/indra/newview/skins/default/xui/fr/menu_inventory.xml
index ba255431cb..2132184f83 100644
--- a/indra/newview/skins/default/xui/fr/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/fr/menu_inventory.xml
@@ -1,14 +1,5 @@
-
-
-
-
-
-
-
-
-
@@ -99,11 +90,13 @@
-
-
-
+
+
+
+
+
+
-
@@ -134,7 +127,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/it/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/it/menu_gallery_inventory.xml
index 8bbddef8a0..204a572d45 100644
--- a/indra/newview/skins/default/xui/it/menu_gallery_inventory.xml
+++ b/indra/newview/skins/default/xui/it/menu_gallery_inventory.xml
@@ -22,8 +22,10 @@
-
-
+
+
+
+
@@ -91,7 +93,9 @@
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/it/menu_inventory.xml b/indra/newview/skins/default/xui/it/menu_inventory.xml
index 55dedb3d5a..bfa1380b43 100644
--- a/indra/newview/skins/default/xui/it/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/it/menu_inventory.xml
@@ -1,14 +1,5 @@
-
-
-
-
-
-
-
-
-
@@ -97,11 +88,13 @@
-
-
-
+
+
+
+
+
+
-
@@ -133,7 +126,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ja/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/ja/menu_gallery_inventory.xml
index c9084a6037..3cf850faf5 100644
--- a/indra/newview/skins/default/xui/ja/menu_gallery_inventory.xml
+++ b/indra/newview/skins/default/xui/ja/menu_gallery_inventory.xml
@@ -22,8 +22,10 @@
-
-
+
+
+
+
@@ -101,7 +103,9 @@
-
-
+
+
+
+
\ No newline at end of file
diff --git a/indra/newview/skins/default/xui/ja/menu_inventory.xml b/indra/newview/skins/default/xui/ja/menu_inventory.xml
index 3d6bfb0193..581f991a20 100644
--- a/indra/newview/skins/default/xui/ja/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/ja/menu_inventory.xml
@@ -1,14 +1,5 @@
-
-
-
-
-
-
-
-
-
@@ -92,12 +83,14 @@
-
-
-
+
+
+
+
+
+
-
@@ -139,7 +132,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/pl/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/pl/menu_gallery_inventory.xml
index a84c0618a3..e7e92d3fe2 100644
--- a/indra/newview/skins/default/xui/pl/menu_gallery_inventory.xml
+++ b/indra/newview/skins/default/xui/pl/menu_gallery_inventory.xml
@@ -23,8 +23,10 @@
-
-
+
+
+
+
@@ -102,7 +104,9 @@
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/pl/menu_inventory.xml b/indra/newview/skins/default/xui/pl/menu_inventory.xml
index 1eba45f84d..af9c5f1763 100644
--- a/indra/newview/skins/default/xui/pl/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/pl/menu_inventory.xml
@@ -1,14 +1,5 @@
-
-
-
-
-
-
-
-
-
@@ -100,11 +91,13 @@
-
-
-
+
+
+
+
+
+
-
@@ -139,7 +132,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/pt/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/pt/menu_gallery_inventory.xml
index c4426efb42..a8752b7f3c 100644
--- a/indra/newview/skins/default/xui/pt/menu_gallery_inventory.xml
+++ b/indra/newview/skins/default/xui/pt/menu_gallery_inventory.xml
@@ -22,8 +22,10 @@
-
-
+
+
+
+
@@ -101,7 +103,9 @@
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/pt/menu_inventory.xml b/indra/newview/skins/default/xui/pt/menu_inventory.xml
index b0bcfb577a..7cd4840f9d 100644
--- a/indra/newview/skins/default/xui/pt/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/pt/menu_inventory.xml
@@ -1,14 +1,5 @@
-
-
-
-
-
-
-
-
-
@@ -97,11 +88,13 @@
-
-
-
+
+
+
+
+
+
-
@@ -140,7 +133,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ru/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/ru/menu_gallery_inventory.xml
index 584d58adaf..6b9d3903ab 100644
--- a/indra/newview/skins/default/xui/ru/menu_gallery_inventory.xml
+++ b/indra/newview/skins/default/xui/ru/menu_gallery_inventory.xml
@@ -22,8 +22,10 @@
-
-
+
+
+
+
@@ -68,7 +70,9 @@
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/ru/menu_inventory.xml b/indra/newview/skins/default/xui/ru/menu_inventory.xml
index 262ef719fd..d903c985a2 100644
--- a/indra/newview/skins/default/xui/ru/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/ru/menu_inventory.xml
@@ -1,14 +1,5 @@
-
-
-
-
-
-
-
-
-
@@ -97,11 +88,13 @@
-
-
-
+
+
+
+
+
+
-
@@ -135,7 +128,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/zh/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/zh/menu_gallery_inventory.xml
index b43e81fd51..ace0eb4ded 100644
--- a/indra/newview/skins/default/xui/zh/menu_gallery_inventory.xml
+++ b/indra/newview/skins/default/xui/zh/menu_gallery_inventory.xml
@@ -23,8 +23,10 @@
-
-
+
+
+
+
@@ -102,7 +104,9 @@
-
-
+
+
+
+
\ No newline at end of file
diff --git a/indra/newview/skins/default/xui/zh/menu_inventory.xml b/indra/newview/skins/default/xui/zh/menu_inventory.xml
index a4d1f7cf34..0724630a4e 100644
--- a/indra/newview/skins/default/xui/zh/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/zh/menu_inventory.xml
@@ -1,14 +1,5 @@
-
-
-
-
-
-
-
-
-
@@ -98,11 +89,13 @@
-
-
-
+
+
+
+
+
+
-
@@ -141,7 +134,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file