From 7775cc4d9cfe805401d86ec8e5eb4a8f41d83713 Mon Sep 17 00:00:00 2001 From: cinder <cinder@cinderblocks.biz> Date: Mon, 12 Dec 2022 21:38:55 -0600 Subject: [PATCH] Fix Avatar.CopyData support in Legacy Profiles --- indra/newview/llpanelprofilelegacy.cpp | 16 ---------- indra/newview/llpanelprofilelegacy.h | 1 - .../default/xui/en/menu_profile_legacy.xml | 30 +++++++++++-------- 3 files changed, 17 insertions(+), 30 deletions(-) diff --git a/indra/newview/llpanelprofilelegacy.cpp b/indra/newview/llpanelprofilelegacy.cpp index 04fa5fbecd0..9a28e350116 100644 --- a/indra/newview/llpanelprofilelegacy.cpp +++ b/indra/newview/llpanelprofilelegacy.cpp @@ -88,7 +88,6 @@ LLPanelProfileLegacy::LLPanelProfileLegacy() mCommitCallbackRegistrar.add("Profile.CommitProperties", boost::bind(&LLPanelProfileLegacy::onCommitAvatarProperties, this)); mCommitCallbackRegistrar.add("Profile.CommitRights", boost::bind(&LLPanelProfileLegacy::onCommitRights, this)); mCommitCallbackRegistrar.add("Profile.CommitModifyObjectRights", boost::bind(&LLPanelProfileLegacy::onCommitModifyObjectsRights, this, _1)); - mCommitCallbackRegistrar.add("Profile.CopyData", boost::bind(&LLPanelProfileLegacy::copyData, this, _2)); mCommitCallbackRegistrar.add("Profile.Action", boost::bind(&LLPanelProfileLegacy::onCommitAction, this, _2)); mEnableCallbackRegistrar.add("Profile.Enable", boost::bind(&LLPanelProfileLegacy::isActionEnabled, this, _2)); } @@ -566,21 +565,6 @@ void LLPanelProfileLegacy::onCommitAction(const LLSD& userdata) LL_WARNS("LegacyProfiles") << "Unhandled action: " << action << LL_ENDL; } -void LLPanelProfileLegacy::copyData(const LLSD& userdata) -{ -#if WIP_COPY - const std::string& param = userdata.asString(); - if (param == "copy_name") - LLAvatarActions::copyData(getAvatarId(), LLAvatarActions::E_DATA_NAME); - else if (param == "copy_slurl") - LLAvatarActions::copyData(getAvatarId(), LLAvatarActions::E_DATA_SLURL); - else if (param == "copy_key") - LLAvatarActions::copyData(getAvatarId(), LLAvatarActions::E_DATA_UUID); - else - LL_WARNS("LegacyProfiles") << "Unhandled action: " << param << LL_ENDL; -#endif -} - bool LLPanelProfileLegacy::isActionEnabled(const LLSD& userdata) { bool action_enabled = false; diff --git a/indra/newview/llpanelprofilelegacy.h b/indra/newview/llpanelprofilelegacy.h index 3d27fa628aa..811a3972668 100644 --- a/indra/newview/llpanelprofilelegacy.h +++ b/indra/newview/llpanelprofilelegacy.h @@ -78,7 +78,6 @@ class LLPanelProfileLegacy final : public LLPanelProfileLegacyTab void onBackBtnClick(); void onCommitModifyObjectsRights(LLUICtrl* ctrl); void onCommitAction(const LLSD& userdata); - void copyData(const LLSD& userdata); void onNameChanged(); bool isActionEnabled(const LLSD& userdata); bool handleConfirmModifyRightsCallback(const LLSD& notification, const LLSD& response); diff --git a/indra/newview/skins/default/xui/en/menu_profile_legacy.xml b/indra/newview/skins/default/xui/en/menu_profile_legacy.xml index eb7f625cd7f..8f01e7c7baa 100644 --- a/indra/newview/skins/default/xui/en/menu_profile_legacy.xml +++ b/indra/newview/skins/default/xui/en/menu_profile_legacy.xml @@ -85,22 +85,26 @@ <menu_item_call label="Copy Name" name="Copy Name"> - <menu_item_call.on_click - function="Profile.CopyData" - parameter="copy_name" /> + <menu_item_call.on_click + function="Avatar.CopyData" + parameter="account_name"/> + <menu_item_call.on_enable + function="RLV.CanShowName" /> </menu_item_call> <menu_item_call - label="Copy SLURL" - name="Copy SLURL"> - <menu_item_call.on_click - function="Profile.CopyData" - parameter="copy_slurl" /> + label="Copy SLurl" + name="Copy SLurl"> + <menu_item_call.on_click + function="Avatar.CopyData" + parameter="slurl"/> + <menu_item_call.on_enable + function="RLV.CanShowName" /> </menu_item_call> <menu_item_call - label="Copy Key" - name="Copy Key"> - <menu_item_call.on_click - function="Profile.CopyData" - parameter="copy_key" /> + label="Copy ID" + name="Copy ID"> + <menu_item_call.on_click + function="Avatar.CopyData" + parameter="id"/> </menu_item_call> </toggleable_menu> -- GitLab