diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-10-17 17:33:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-17 17:33:36 +0300 |
commit | 19ac7d18e811748c9f9c756a7830429714bc8ca2 (patch) | |
tree | 7906cf087b5154da0a2de2168a456d1be43838bc /indra/newview/llinventorybridge.cpp | |
parent | bae25942a7bee6540c252b0a449a0882859c8822 (diff) |
SL-20465 allow creating new items from the right-click context menu
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 661db13baa..c41a4c5686 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -766,7 +766,7 @@ void hide_context_entries(LLMenuGL& menu, // descend into split menus: LLMenuItemBranchGL* branchp = dynamic_cast<LLMenuItemBranchGL*>(menu_item); - if ((name == "More") && branchp) + if (((name == "More") || (name == "create_new")) && branchp) { hide_context_entries(*branchp->getBranch(), entries_to_show, disabled_entries); } @@ -821,7 +821,7 @@ void hide_context_entries(LLMenuGL& menu, // so that some other UI element from multi-select doesn't later set this invisible. menu_item->pushVisible(TRUE); - bool enabled = (menu_item->getEnabled() == TRUE); + bool enabled = true; for (itor2 = disabled_entries.begin(); enabled && (itor2 != disabled_entries.end()); ++itor2) { enabled &= (*itor2 != name); @@ -4269,6 +4269,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("New Folder")); disabled_items.push_back(std::string("upload_def")); + disabled_items.push_back(std::string("create_new")); } if (favorites == mUUID) { @@ -4291,6 +4292,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items { disabled_items.push_back(std::string("New Folder")); disabled_items.push_back(std::string("upload_def")); + disabled_items.push_back(std::string("create_new")); } if (marketplace_listings_id == mUUID) { @@ -4352,6 +4354,17 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items if (!isMarketplaceListingsFolder()) { items.push_back(std::string("upload_def")); + items.push_back(std::string("create_new")); + items.push_back(std::string("New Script")); + items.push_back(std::string("New Note")); + items.push_back(std::string("New Gesture")); + items.push_back(std::string("New Clothes")); + items.push_back(std::string("New Body Parts")); + items.push_back(std::string("New Settings")); + if (!LLEnvironment::instance().isInventoryEnabled()) + { + disabled_items.push_back("New Settings"); + } } } getClipboardEntries(false, items, disabled_items, flags); |