[UI] Add Copy Folder UUID to inventory actions

This commit is contained in:
Router Gray
2020-02-19 12:40:33 -06:00
parent 9548270306
commit 1ece0e6051
2 changed files with 10 additions and 0 deletions

View File

@@ -2964,6 +2964,12 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action)
LFFloaterInvPanel::show(LLSD().with("id", mUUID), cat->getName(), model);
return;
}
else if ("copy_folder_uuid" == action)
{
// Single folder only
gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(mUUID.asString()));
return;
}
else if ("paste" == action)
{
pasteFromClipboard();
@@ -3896,6 +3902,7 @@ void build_context_menu_folder_options(LLInventoryModel* model, const LLUUID& mU
if (listings_folder.notNull() && gInventory.isObjectDescendentOf(mUUID, listings_folder)) return;
items.push_back(std::string("Open Folder In New Window"));
items.push_back(std::string("Copy Folder UUID"));
LLFolderType::EType type = category->getPreferredType();
const bool is_system_folder = LLFolderType::lookupIsProtectedType(type);

View File

@@ -94,6 +94,9 @@
<menu_item_call label="Open in New Window" name="Open Folder In New Window">
<on_click function="Inventory.DoToSelected" userdata="open_in_new_window"/>
</menu_item_call>
<menu_item_call label="Copy Folder UUID" name="Copy Folder UUID">
<on_click function="Inventory.DoToSelected" userdata="copy_folder_uuid"/>
</menu_item_call>
<menu_item_call bottom_delta="-18" height="18" label="New Folder" left="0" mouse_opaque="true"
name="New Folder" width="128">
<on_click filter="" function="Inventory.DoCreate" userdata="category" />