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 | |
parent | e9dd8af1cecceb75c234236dcc9c6451f9b83e34 (diff) |
Move include in search results from profile window to preference privacy pane
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 39 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.h | 11 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_edit_profile.xml | 145 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_privacy.xml | 9 |
4 files changed, 172 insertions, 32 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() diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index e99731b92e..9601ea1cd7 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -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 diff --git a/indra/newview/skins/default/xui/en/panel_edit_profile.xml b/indra/newview/skins/default/xui/en/panel_edit_profile.xml index 6781a76120..37265d65f1 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_profile.xml @@ -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]" 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 4ebd4c76f8..d23bdd10a2 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -41,6 +41,15 @@ (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" label="Only friends and groups know I'm online" |