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"/>
+
+
+
+
-
-
-
-
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 21743baf9d..1402803ebe 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
@@ -380,7 +380,7 @@ Account: [ACCTTYPE]
name="settings_panel"
follows="all"
layout="topleft"
- width="200"
+ width="190"
auto_resize="false"
user_resize="false">
@@ -399,7 +399,7 @@ Account: [ACCTTYPE]
left="1"
top="18"
height="23"
- width="140"
+ width="180"
follows="left|top"
layout="topleft"
visible="true"