diff options
author | prep linden <prep@lindenlab.com> | 2010-11-18 16:05:35 -0500 |
---|---|---|
committer | prep linden <prep@lindenlab.com> | 2010-11-18 16:05:35 -0500 |
commit | d4b055b0860cda675ed0af94ea7e8fc9e64ceb93 (patch) | |
tree | 81f9c742e3c206ba87ecb70c834c1426724f5f78 /indra/newview/llfloaterpreference.cpp | |
parent | e9dd8af1cecceb75c234236dcc9c6451f9b83e34 (diff) |
Move include in search results from profile window to preference privacy pane
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 41f85ae29d..541316efb3 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -307,8 +307,44 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.BlockList", boost::bind(&LLFloaterPreference::onClickBlockList, this)); sSkin = gSavedSettings.getString("SkinCurrent"); + //prep + LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this ); + LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest( gAgent.getID() ); } + +//prep +void LLFloaterPreference::processProperties( void* pData, EAvatarProcessorType type ) +{ + if ( APT_PROPERTIES == type ) + { + const LLAvatarData* pAvatarData = static_cast<const LLAvatarData*>( pData ); + storeAvatarProperties( pAvatarData ); + processProfileProperties( pAvatarData ); + } +} +void LLFloaterPreference::storeAvatarProperties( const LLAvatarData* pAvatarData ) +{ + mAvatarProperties.avatar_id = gAgent.getID(); + mAvatarProperties.image_id = pAvatarData->image_id; + mAvatarProperties.fl_image_id = pAvatarData->fl_image_id; + 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; +} +void LLFloaterPreference::processProfileProperties(const LLAvatarData* pAvatarData ) +{ + getChild<LLUICtrl>("online_searchresults")->setValue( pAvatarData->allow_publish ); +} + +void LLFloaterPreference::saveAvatarProperties( void ) +{ + mAvatarProperties.allow_publish = getChild<LLUICtrl>("online_searchresults")->getValue(); + LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesUpdate( &mAvatarProperties ); +} + + BOOL LLFloaterPreference::postBuild() { gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2)); @@ -456,6 +492,9 @@ void LLFloaterPreference::apply() gAgent.sendAgentUpdateUserInfo(new_im_via_email,mDirectoryVisibility); } } + + //prep + saveAvatarProperties(); } void LLFloaterPreference::cancel() |