Move include in search results from profile window to preference privacy pane

meow-7.2.2
prep linden 2010-11-18 16:05:35 -05:00
parent e9dd8af1ce
commit d4b055b086
4 changed files with 172 additions and 32 deletions

View File

@ -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()

View File

@ -34,6 +34,7 @@
#define LL_LLFLOATERPREFERENCE_H
#include "llfloater.h"
#include "llavatarpropertiesprocessor.h"
class LLPanelPreference;
class LLPanelLCD;
@ -55,7 +56,7 @@ typedef enum
// Floater to control preferences (display, audio, bandwidth, general.
class LLFloaterPreference : public LLFloater
class LLFloaterPreference : public LLFloater, public LLAvatarPropertiesObserver
{
public:
LLFloaterPreference(const LLSD& key);
@ -76,6 +77,12 @@ public:
// translate user's busy response message according to current locale if message is default, otherwise do nothing
static void initBusyResponse();
//prep
void processProperties( void* pData, EAvatarProcessorType type );
void processProfileProperties(const LLAvatarData* pAvatarData );
void storeAvatarProperties( const LLAvatarData* pAvatarData );
void saveAvatarProperties( void );
protected:
void onBtnOK();
@ -150,6 +157,8 @@ private:
bool mOriginalHideOnlineStatus;
std::string mDirectoryVisibility;
//prep
LLAvatarData mAvatarProperties;
};
class LLPanelPreference : public LLPanel

View File

@ -3,7 +3,7 @@
background_visible="true"
class="edit_profile_panel"
follows="all"
height="535"
height="585"
label="Profile Edit"
layout="topleft"
left="0"
@ -60,7 +60,7 @@
<scroll_container
color="DkGray2"
follows="all"
height="494"
height="537"
min_height="300"
layout="topleft"
left="8"
@ -74,7 +74,7 @@
follows="left|top|right"
layout="topleft"
top="0"
height="494"
height="537"
min_height="300"
left="0"
width="292">
@ -83,16 +83,110 @@
follows="left|top|right"
layout="topleft"
top="0"
height="494"
height="537"
min_height="300"
left="0"
width="292">
<text
top="5"
follows="top|left"
height="13"
layout="topleft"
left="10"
name="display_name_label"
text_color="LtGray"
value="Display Name:"
width="80" />
<text
top="5"
follows="top|left"
height="13"
layout="topleft"
left="10"
name="solo_username_label"
text_color="LtGray"
value="Username:"
visible="false"
width="80" />
<button
name="set_name"
layout="topleft"
follows="top|left"
image_overlay="Edit_Wrench"
top="21"
left="10"
height="23"
width="23"
tool_tip="Set Display Name"/>
<text
follows="top|left"
font="SansSerifBigBold"
height="20"
layout="topleft"
left="10"
name="solo_user_name"
text_color="white"
top_delta="3"
value="Hamilton Hitchings"
use_ellipses="true"
visible="false"
width="275" />
<text
follows="top|left"
font="SansSerifBigBold"
height="20"
layout="topleft"
left="43"
name="user_name"
text_color="white"
top_delta="0"
value="Hamilton Hitchings"
use_ellipses="true"
visible="true"
width="250" />
<text
follows="top|left"
font="SansSerifBold"
height="20"
layout="topleft"
left_delta="0"
name="user_name_small"
text_color="white"
top_delta="-4"
value="Hamilton Hitchings"
use_ellipses="true"
visible="false"
wrap="true"
width="245" />
<text
follows="top|left"
height="13"
layout="topleft"
left="10"
name="user_label"
text_color="LtGray"
top_pad="8"
value="Username:"
width="70" />
<text
follows="top|left"
height="20"
layout="topleft"
left_pad="0"
name="user_slid"
text_color="EmphasisColor"
font="SansSerifBold"
top_delta="-2"
use_ellipses="true"
value="hamilton.linden"
wrap="true"
width="205" />
<panel
name="lifes_images_panel"
follows="left|top|right"
height="244"
layout="topleft"
top="0"
top="65"
left="0"
width="292">
<panel
@ -146,8 +240,8 @@
height="102"
layout="topleft"
left="123"
top="25"
max_length="511"
top="90"
max_length="512"
name="sl_description_edit"
width="157"
word_wrap="true">
@ -202,8 +296,8 @@
height="102"
layout="topleft"
left="123"
max_length="254"
top="157"
max_length="512"
top="223"
name="fl_description_edit"
width="157"
word_wrap="true">
@ -234,17 +328,6 @@
name="homepage_edit"
width="272">
</line_editor>
<check_box
follows="left|top"
font="SansSerifSmall"
label="Show me in Search results"
layout="topleft"
left="8"
name="show_in_search_checkbox"
height="15"
label_text.text_color="white"
top_pad="12"
width="100" />
<text
follows="left|top"
font="SansSerifSmall"
@ -301,22 +384,22 @@
left="10"
name="partner_data_panel"
width="200">
<name_box
follows="left|top|right"
height="30"
initial_value="(retrieving)"
layout="topleft"
left="0"
link="true"
name="partner_text"
top="0"
width="200"
word_wrap="true" />
<text
follows="left|top|right"
height="12"
initial_value="(retrieving)"
layout="topleft"
left="0"
name="partner_text"
top="0"
use_ellipses="true"
width="280"/>
</panel>
<text
follows="left|top"
height="15"
layout="topleft"
link="true"
left="10"
name="partner_edit_link"
value="[[URL] Edit]"

View File

@ -40,6 +40,15 @@
width="300">
(Locations, images, web, search history)
</text>
<check_box
height="16"
enabled="true"
label="Show me in Search results"
layout="topleft"
left="30"
name="online_searchresults"
top_pad="20"
width="350" />
<check_box
height="16"
enabled="false"