SL-15312 Small tweaks for profiles

master
Andrey Kleshchev 2022-04-18 23:39:21 +03:00
parent 8a39aaa3a4
commit ea0c810d2d
6 changed files with 36 additions and 25 deletions

View File

@ -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 );
}
}

View File

@ -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));
}

View File

@ -193,6 +193,7 @@ private:
bool mVoiceStatus;
bool mWaitingForImageUpload;
bool mAllowPublish;
std::string mDescriptionText;
boost::signals2::connection mAvatarNameCacheConnection;

View File

@ -85,6 +85,17 @@
parameter="invite_to_group"/>
</menu_item_call>
<menu_item_separator name="separator_invite_to_group"/>
<menu_item_call
label="Permissions"
layout="topleft"
name="agent_permissions">
<menu_item_call.on_click
function="Profile.Commit"
parameter="agent_permissions"/>
<menu_item_call.on_visible
function="Profile.EnableItem"
parameter="agent_permissions"/>
</menu_item_call>
<menu_item_call
label="Map"
layout="topleft"
@ -127,17 +138,6 @@
parameter="toggle_block_agent"/>
</menu_item_check>
<menu_item_separator name="separator_copy_options"/>
<menu_item_call
label="Permissions"
layout="topleft"
name="agent_permissions">
<menu_item_call.on_click
function="Profile.Commit"
parameter="agent_permissions"/>
<menu_item_call.on_visible
function="Profile.EnableItem"
parameter="agent_permissions"/>
</menu_item_call>
<menu_item_call
label="Copy Display Name"
layout="topleft"

View File

@ -21,7 +21,7 @@
/>
<text
name="status_message"
value="Private notes on this avatar:"
value="Make notes about this person here. No one else can see your notes."
top="6"
left="6"
right="-6"
@ -33,10 +33,10 @@
<text_editor
name="notes_edit"
enabled="false"
top_pad="4"
top="28"
left="6"
right="-6"
height="311"
bottom="-26"
follows="all"
layout="topleft"
max_length="65530"
@ -45,21 +45,21 @@
<button
name="notes_save_changes"
label="Save"
top="429"
bottom="-1"
right="-108"
height="20"
width="80"
enabled="false"
follows="top|right"
follows="bottom|right"
layout="topleft"/>
<button
name="notes_discard_changes"
label="Discard"
top_delta="0"
bottom="-1"
right="-4"
height="20"
width="100"
enabled="false"
follows="top|right"
follows="bottom|right"
layout="topleft"/>
</panel>

View File

@ -380,7 +380,7 @@ Account: [ACCTTYPE]
name="settings_panel"
follows="all"
layout="topleft"
width="200"
width="190"
auto_resize="false"
user_resize="false">
<!-- only for self -->
@ -399,7 +399,7 @@ Account: [ACCTTYPE]
left="1"
top="18"
height="23"
width="140"
width="180"
follows="left|top"
layout="topleft"
visible="true"