From c6cc69b01b3a7e11e3acfefe6533eb802a380a91 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 7 Mar 2019 14:08:19 -0500 Subject: [PATCH] [VMM] Added Feature "Copy Listing ID" Take it from me, LGPL or whatever, I don't care, this is QoL --- indra/newview/llinventorybridge.cpp | 6 ++++++ indra/newview/skins/default/xui/en-us/menu_inventory.xml | 3 +++ 2 files changed, 9 insertions(+) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index e03cc5bf8..634145a0c 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1031,6 +1031,7 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags, { disabled_items.push_back(std::string("Marketplace Create Listing")); disabled_items.push_back(std::string("Marketplace Associate Listing")); + items.push_back(std::string("Marketplace Copy ID")); if (LLMarketplaceData::instance().getVersionFolder(mUUID).isNull()) { disabled_items.push_back(std::string("Marketplace List")); @@ -3131,6 +3132,11 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) } return; } + else if ("marketplace_copy_id") + { + auto id = LLMarketplaceData::instance().getListingID(mUUID); + gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(std::to_string(id))); + } // Move displaced inventory to lost and found else if ("move_to_lost_and_found" == action) { diff --git a/indra/newview/skins/default/xui/en-us/menu_inventory.xml b/indra/newview/skins/default/xui/en-us/menu_inventory.xml index 4f2f5e35d..f4f16845e 100644 --- a/indra/newview/skins/default/xui/en-us/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en-us/menu_inventory.xml @@ -46,6 +46,9 @@ name="Marketplace Deactivate"> + + +