From 27133e3d27b216203a2f82c90521d1b6473e3b81 Mon Sep 17 00:00:00 2001 From: cinder <cinder@cinderblocks.biz> Date: Wed, 14 Dec 2022 22:22:05 -0600 Subject: [PATCH] Dogfood for now --- indra/newview/llpanelprofilelegacy.cpp | 13 +++++++++++++ .../skins/default/xui/en/menu_profile_legacy.xml | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/indra/newview/llpanelprofilelegacy.cpp b/indra/newview/llpanelprofilelegacy.cpp index f39090fcb2c..c326b33acbe 100644 --- a/indra/newview/llpanelprofilelegacy.cpp +++ b/indra/newview/llpanelprofilelegacy.cpp @@ -568,6 +568,14 @@ void LLPanelProfileLegacy::onCommitAction(const LLSD& userdata) LLAvatarActions::pay(getAvatarId()); else if (action == "report_abuse") LLFloaterReporter::showFromObject(getAvatarId()); + else if (action == "upload_sl") + { + // *TODO: + } + else if (action == "upload_fl") + { + // *TODO: + } else if (action == "webprofile") ALAvatarActions::showWebProfile(getAvatarId()); else @@ -594,6 +602,11 @@ bool LLPanelProfileLegacy::isActionEnabled(const LLSD& userdata) action_enabled = (getAvatarId() != gAgentID); else if (check == "can_drama") action_enabled = (getAvatarId() != gAgentID); + else if (check == "can_upload_pic") + { + action_enabled = getAvatarId() == gAgentID + && !gAgent.getRegionCapability("UploadAgentProfileImage").empty(); + } else LL_INFOS("LegacyProfiles") << "Unhandled check " << check << LL_ENDL; return action_enabled; 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 7a985a3f9a5..eb84af1aee0 100644 --- a/indra/newview/skins/default/xui/en/menu_profile_legacy.xml +++ b/indra/newview/skins/default/xui/en/menu_profile_legacy.xml @@ -21,6 +21,9 @@ <menu_item_call.on_click function="Profile.Action" parameter="upload_sl"/> + <menu_item_call.on_enable + function="Profile.Enable" + parameter="can_upload_pic" /> </menu_item_call> <menu_item_call label="First Life..." @@ -28,6 +31,9 @@ <menu_item_call.on_click function="Profile.Action" parameter="upload_fl"/> + <menu_item_call.on_enable + function="Profile.Enable" + parameter="can_upload_pic" /> </menu_item_call> </menu>--> <menu_item_call -- GitLab