diff --git a/indra/newview/llpanelprofilelegacy.cpp b/indra/newview/llpanelprofilelegacy.cpp index f39090fcb2cda42e659730b207608a0788032de8..c326b33acbe6e61b52885bdf887d5a3c86fed7ad 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 7a985a3f9a5c7b0865d412395645fc72dbd94cdb..eb84af1aee03e927a3b8007dd0baecc2af8cc67c 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