diff --git a/indra/newview/fspanelprofile.cpp b/indra/newview/fspanelprofile.cpp index cda2b4e05d..90251667d6 100644 --- a/indra/newview/fspanelprofile.cpp +++ b/indra/newview/fspanelprofile.cpp @@ -251,17 +251,28 @@ BOOL FSPanelProfileSecondLife::postBuild() // allow skins to have copy buttons for name and avatar URI -Zi LLButton* copy_uri_button = findChild("copy_uri_button"); LLButton* copy_name_button = findChild("copy_name_button"); - + // FIRE-21241 - Allow copy URI to appear only on the self profile in certain skins + // First we check for a all purpose copy_uri_button, if that was not defined + // then we do a second lookup for copy_own_uri_button. + if (!copy_uri_button) + { + // extended check to allow skins to have a copy button only on the self tab + copy_uri_button = findChild("copy_own_uri_button"); + } + // Same for name + if (!copy_name_button){ + copy_name_button = findChild("copy_own_name_button"); + } + // if (copy_uri_button) { copy_uri_button->setCommitCallback(boost::bind(&FSPanelProfileSecondLife::onCopyURI, this)); } - if (copy_name_button) { copy_name_button->setCommitCallback(boost::bind(&FSPanelProfileSecondLife::onCopyToClipboard, this)); } - // allow skins to have copy buttons for name and avatar URI -Zi + LLVoiceClient::getInstance()->addObserver((LLVoiceClientStatusObserver*)this); @@ -310,6 +321,22 @@ void FSPanelProfileSecondLife::onOpen(const LLSD& key) FSDropTarget* drop_target = getChild("drop_target"); drop_target->setVisible(!own_profile); drop_target->setEnabled(!own_profile); + + // FIRE-21241 - Allow copy URI to appear only on the self profile in certain skins + // extended check to allow skins to have a copy button only on the self tab + LLButton* copy_uri_button = findChild("copy_own_uri_button"); + LLButton* copy_name_button = findChild("copy_own_name_button"); + if (copy_uri_button) + { + copy_uri_button->setVisible(own_profile); + copy_uri_button->setEnabled(own_profile); + } + if (copy_name_button) + { + copy_name_button->setVisible(own_profile); + copy_name_button->setEnabled(own_profile); + } + // if (!own_profile) { diff --git a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml index 9f0327f6f2..f715822db0 100644 --- a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml +++ b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml @@ -166,15 +166,7 @@ KC: Use view_border's around text_editor's due to text render issues with border enabled="false" max_length="254" value="(loading...)" /> -