prep linden avatar prep linden committed e3ebae9

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

Comments (0)

Files changed (4)

indra/newview/llfloaterpreference.cpp

 	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));
 			gAgent.sendAgentUpdateUserInfo(new_im_via_email,mDirectoryVisibility);
 		}
 	}
+	
+	//prep
+	saveAvatarProperties();
 }
 
 void LLFloaterPreference::cancel()

indra/newview/llfloaterpreference.h

 #define LL_LLFLOATERPREFERENCE_H
 
 #include "llfloater.h"
+#include "llavatarpropertiesprocessor.h"
 
 class LLPanelPreference;
 class LLPanelLCD;
 
 
 // Floater to control preferences (display, audio, bandwidth, general.
-class LLFloaterPreference : public LLFloater
+class LLFloaterPreference : public LLFloater, public LLAvatarPropertiesObserver
 {
 public: 
 	LLFloaterPreference(const LLSD& key);
 	
 	// 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();
 	
 	bool mOriginalHideOnlineStatus;
 	std::string mDirectoryVisibility;
+	//prep
+	LLAvatarData mAvatarProperties;
 };
 
 class LLPanelPreference : public LLPanel

indra/newview/skins/default/xui/en/panel_edit_profile.xml

  background_visible="true"
  class="edit_profile_panel"
   follows="all"
- height="535"
+ height="585"
  label="Profile Edit"
  layout="topleft"
  left="0"
  <scroll_container
      color="DkGray2"
      follows="all"
-     height="494"
+     height="537"
      min_height="300"
      layout="topleft"
      left="8"
          follows="left|top|right"
          layout="topleft"
          top="0"
-     height="494"
+     height="537"
      min_height="300"
          left="0"
          width="292">
      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
        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">
        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">
        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"
          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]"

indra/newview/skins/default/xui/en/panel_preferences_privacy.xml

        (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"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.