summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-07-19 18:54:48 +0800
committerErik Kundiman <erik@megapahit.org>2024-07-19 18:54:48 +0800
commitcc1421d80d64d3802ebf0842355613251121f0be (patch)
tree1807070f8acac679a707157f0c694eef2a9e768d /indra/newview
parent5deb0352955c9d8c3caf2ffb3a3aaf53f617c8ef (diff)
Copy profile link to clipboard in profile actions
https://megapahit.com/show_bug.cgi?id=47
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelprofile.cpp5
-rw-r--r--indra/newview/skins/default/xui/en/menu_profile_other.xml8
-rw-r--r--indra/newview/skins/default/xui/en/menu_profile_self.xml8
3 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 0f0af37485..b184668290 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -1386,6 +1386,11 @@ void LLPanelProfileSecondLife::onCommitMenu(const LLSD& userdata)
LLWString wstr = utf8str_to_wstring(getAvatarId().asString());
LLClipboard::instance().copyToClipboard(wstr, 0, wstr.size());
}
+ else if (item_name == "copy_profile_link")
+ {
+ LLWString wstr = utf8str_to_wstring(llformat("secondlife:///app/agent/%s/about", getAvatarId().asString().c_str()));
+ LLClipboard::instance().copyToClipboard(wstr, 0, wstr.size());
+ }
else if (item_name == "agent_permissions")
{
onShowAgentPermissionsDialog();
diff --git a/indra/newview/skins/default/xui/en/menu_profile_other.xml b/indra/newview/skins/default/xui/en/menu_profile_other.xml
index 101ae33778..a505b38087 100644
--- a/indra/newview/skins/default/xui/en/menu_profile_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_profile_other.xml
@@ -168,4 +168,12 @@
function="Profile.Commit"
parameter="copy_user_id"/>
</menu_item_call>
+ <menu_item_call
+ label="Copy Profile Link"
+ layout="topleft"
+ name="copy_link">
+ <menu_item_call.on_click
+ function="Profile.Commit"
+ parameter="copy_profile_link"/>
+ </menu_item_call>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_profile_self.xml b/indra/newview/skins/default/xui/en/menu_profile_self.xml
index 1b21c7ae61..0a03d7ac2b 100644
--- a/indra/newview/skins/default/xui/en/menu_profile_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_profile_self.xml
@@ -82,4 +82,12 @@
function="Profile.Commit"
parameter="copy_user_id"/>
</menu_item_call>
+ <menu_item_call
+ label="Copy Profile Link"
+ layout="topleft"
+ name="copy_link">
+ <menu_item_call.on_click
+ function="Profile.Commit"
+ parameter="copy_profile_link"/>
+ </menu_item_call>
</toggleable_menu>