Commits

prep linden committed 9bdb341

Social-166

  • Participants
  • Parent commits 62f0760

Comments (0)

Files changed (1)

indra/newview/llfloaterpreference.cpp

 	mDoubleClickActionDirty(false)
 {
 	
-	
 	//Build Floater is now Called from 	LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
 	
 	static bool registered_dialog = false;
 	mAvatarProperties.about_text	= pAvatarData->about_text;
 	mAvatarProperties.fl_about_text = pAvatarData->fl_about_text;
 	mAvatarProperties.profile_url   = pAvatarData->profile_url;
-	mAvatarProperties.allow_publish	= pAvatarData->allow_publish;
+	mAvatarProperties.flags		    = pAvatarData->flags;
+	mAvatarProperties.allow_publish	= pAvatarData->flags & AVATAR_ALLOW_PUBLISH;
 }
 
 void LLFloaterPreference::processProfileProperties(const LLAvatarData* pAvatarData )
 {
-	getChild<LLUICtrl>("online_searchresults")->setValue( pAvatarData->allow_publish );	
+	getChild<LLUICtrl>("online_searchresults")->setValue( (bool)(pAvatarData->flags & AVATAR_ALLOW_PUBLISH) );	
 }
 
 void LLFloaterPreference::saveAvatarProperties( void )
 {
 	mAvatarProperties.allow_publish = getChild<LLUICtrl>("online_searchresults")->getValue();
+	if ( mAvatarProperties.allow_publish )
+	{
+		mAvatarProperties.flags |= AVATAR_ALLOW_PUBLISH;
+	}
+	
 	LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesUpdate( &mAvatarProperties );
 }
 
 void LLFloaterPreference::onOpen(const LLSD& key)
 {	
 	
-	
 	// this variable and if that follows it are used to properly handle busy mode response message
 	static bool initialized = FALSE;
 	// if user is logged in and we haven't initialized busy_response yet, do it