From ea0c810d2d082a9684d9ce6b9cbd888c87f06612 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 18 Apr 2022 23:39:21 +0300 Subject: SL-15312 Small tweaks for profiles --- indra/newview/llfloaterpreference.cpp | 3 +++ indra/newview/llpanelprofile.cpp | 17 ++++++++++++----- indra/newview/llpanelprofile.h | 1 + .../skins/default/xui/en/menu_profile_other.xml | 22 +++++++++++----------- .../skins/default/xui/en/panel_profile_notes.xml | 14 +++++++------- .../default/xui/en/panel_profile_secondlife.xml | 4 ++-- 6 files changed, 36 insertions(+), 25 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 9064a65d05..7bc16293a5 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -381,10 +381,13 @@ void LLFloaterPreference::saveAvatarProperties( void ) // "allow publish" flag, the last remaining profile setting in the viewer // that doesn't exist in the web profile. // + if ((LLStartUp::getStartupState() == STATE_STARTED) && mAvatarDataInitialized && (allowPublish != mAvatarProperties.allow_publish)) { mAvatarProperties.allow_publish = allowPublish; + // TODO!!!: replace with an AgentProfile cap, once allow_publish works correctly + // otherwise this will trim long descritions/reset profile LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesUpdate( &mAvatarProperties ); } } diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 46b2d032e1..bb6fdc1757 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -786,9 +786,10 @@ void LLFloaterProfilePermissions::onCancel() // LLPanelProfileSecondLife LLPanelProfileSecondLife::LLPanelProfileSecondLife() - : LLPanelProfileTab() - , mAvatarNameCacheConnection() - , mWaitingForImageUpload(false) + : LLPanelProfileTab() + , mAvatarNameCacheConnection() + , mWaitingForImageUpload(false) + , mAllowPublish(false) { } @@ -1056,7 +1057,8 @@ void LLPanelProfileSecondLife::fillCommonData(const LLAvatarData* avatar_data) if (getSelfProfile()) { - mShowInSearchCombo->setValue((BOOL)(avatar_data->flags & AVATAR_ALLOW_PUBLISH)); + mAllowPublish = avatar_data->flags & AVATAR_ALLOW_PUBLISH; + mShowInSearchCombo->setValue((BOOL)mAllowPublish); } } @@ -1530,11 +1532,16 @@ void LLPanelProfileSecondLife::onSetDescriptionDirty() void LLPanelProfileSecondLife::onShowInSearchCallback() { + if (mAllowPublish == mShowInSearchCombo->getValue().asBoolean()) + { + return; + } std::string cap_url = gAgent.getRegionCapability(PROFILE_PROPERTIES_CAP); if (!cap_url.empty()) { + mAllowPublish = mShowInSearchCombo->getValue().asBoolean(); LLSD data; - data["allow_publish"] = mShowInSearchCombo->getValue().asBoolean(); + data["allow_publish"] = mAllowPublish; LLCoros::instance().launch("putAgentUserInfoCoro", boost::bind(put_avatar_properties_coro, cap_url, getAvatarId(), data)); } diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index b959ac1ec3..c4b48979ea 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -193,6 +193,7 @@ private: bool mVoiceStatus; bool mWaitingForImageUpload; + bool mAllowPublish; std::string mDescriptionText; boost::signals2::connection mAvatarNameCacheConnection; 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 fff1f7b614..4db4d0922b 100644 --- a/indra/newview/skins/default/xui/en/menu_profile_other.xml +++ b/indra/newview/skins/default/xui/en/menu_profile_other.xml @@ -85,6 +85,17 @@ parameter="invite_to_group"/> + + + + - - - -