summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterpreference.cpp30
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_privacy.xml2
2 files changed, 23 insertions, 9 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 5444c7dc6e..1a9d0af9af 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -344,7 +344,7 @@ void LLFloaterPreference::processProperties( void* pData, EAvatarProcessorType t
if ( APT_PROPERTIES == type )
{
const LLAvatarData* pAvatarData = static_cast<const LLAvatarData*>( pData );
- if( pAvatarData && gAgent.getID() == pAvatarData->avatar_id )
+ if (pAvatarData && (gAgent.getID() == pAvatarData->avatar_id) && (pAvatarData->avatar_id != LLUUID::null))
{
storeAvatarProperties( pAvatarData );
processProfileProperties( pAvatarData );
@@ -354,9 +354,9 @@ void LLFloaterPreference::processProperties( void* pData, EAvatarProcessorType t
void LLFloaterPreference::storeAvatarProperties( const LLAvatarData* pAvatarData )
{
- if (gAgent.isInitialized() && (gAgent.getID() != LLUUID::null))
+ if (LLStartUp::getStartupState() == STATE_STARTED)
{
- mAvatarProperties.avatar_id = gAgent.getID();
+ mAvatarProperties.avatar_id = pAvatarData->avatar_id;
mAvatarProperties.image_id = pAvatarData->image_id;
mAvatarProperties.fl_image_id = pAvatarData->fl_image_id;
mAvatarProperties.about_text = pAvatarData->about_text;
@@ -376,19 +376,32 @@ void LLFloaterPreference::processProfileProperties(const LLAvatarData* pAvatarDa
void LLFloaterPreference::saveAvatarProperties( void )
{
- mAvatarProperties.allow_publish = getChild<LLUICtrl>("online_searchresults")->getValue();
- if (mAvatarProperties.allow_publish)
+ const BOOL allowPublish = getChild<LLUICtrl>("online_searchresults")->getValue();
+
+ if (allowPublish)
{
mAvatarProperties.flags |= AVATAR_ALLOW_PUBLISH;
}
- if (mAvatarDataInitialized)
+ //
+ // NOTE: We really don't want to send the avatar properties unless we absolutely
+ // need to so we can avoid the accidental profile reset bug, so, if we're
+ // logged in, the avatar data has been initialized and we have a state change
+ // for the "allow publish" flag, then set the flag to its new value and send
+ // the properties update.
+ //
+ // NOTE: The only reason we can not remove this update altogether is because of the
+ // "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;
+
LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesUpdate( &mAvatarProperties );
}
}
-
BOOL LLFloaterPreference::postBuild()
{
gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2));
@@ -1364,6 +1377,8 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im
mOriginalHideOnlineStatus = true;
}
+ getChild<LLUICtrl>("online_searchresults")->setEnabled(TRUE);
+
getChildView("include_im_in_chat_history")->setEnabled(TRUE);
getChildView("show_timestamps_check_im")->setEnabled(TRUE);
getChildView("friends_online_notify_checkbox")->setEnabled(TRUE);
@@ -1743,7 +1758,6 @@ void LLPanelPreferenceGraphics::draw()
bool enable = hasDirtyChilds();
button_apply->setEnabled(enable);
-
}
}
bool LLPanelPreferenceGraphics::hasDirtyChilds()
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
index ef25588ca3..6954a8b53a 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
@@ -42,7 +42,7 @@
</text>
<check_box
height="16"
- enabled="true"
+ enabled="false"
label="Show me in Search results"
layout="topleft"
left="30"