From 23205bb535e446979471296c9fa26f2530a9abaf Mon Sep 17 00:00:00 2001
From: Leyla Farazha <leyla@lindenlab.com>
Date: Thu, 6 Oct 2011 17:18:49 -0700
Subject: [PATCH] EXP-1274 Create floater for "Avatar Picker" content

---
 indra/newview/app_settings/commands.xml       |  4 +--
 indra/newview/app_settings/settings.xml       |  2 +-
 indra/newview/llviewerfloaterreg.cpp          |  1 +
 indra/newview/llviewerwindow.cpp              |  6 +++++
 .../skins/default/xui/en/floater_avatar.xml   | 26 +++++++++++++++++++
 .../default/xui/en/floater_destinations.xml   |  2 ++
 6 files changed, 38 insertions(+), 3 deletions(-)
 create mode 100644 indra/newview/skins/default/xui/en/floater_avatar.xml

diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index 1fff95417b3..e4fc008b4cd 100644
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -26,9 +26,9 @@
            label_ref="Command_Avatar_Label"
            tooltip_ref="Command_Avatar_Tooltip"
            execute_function="Floater.ToolbarToggle"
-           execute_parameters="avatar_picker"
+           execute_parameters="avatar"
            is_running_function="Floater.IsOpen"
-           is_running_parameters="avatar_picker"
+           is_running_parameters="avatar"
            />
   <command name="build"
            available_in_toybox="true"
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 203bcab03ae..092e69952cf 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -619,7 +619,7 @@
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string></string>
+      <string>http://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/agni/avatars.html</string>
     </map>
     <key>AvatarBakedTextureUploadTimeout</key>
     <map>
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 7befc741e39..b0daf9f3c26 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -168,6 +168,7 @@ void LLViewerFloaterReg::registerFloaters()
 	LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLand>);
 	LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
 	LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
+	LLFloaterReg::add("avatar", "floater_avatar.xml",  &LLFloaterReg::build<LLFloater>);
 	LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>);
 	LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>);
 
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index a28950f376b..fae3ee9081c 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1945,6 +1945,12 @@ void LLViewerWindow::initWorldUI()
 		destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
 		destinations->navigateTo(gSavedSettings.getString("DestinationGuideURL"), "text/html");
 	}
+	LLMediaCtrl* avatar_picker = LLFloaterReg::getInstance("avatar")->findChild<LLMediaCtrl>("avatar_picker_contents");
+	if (avatar_picker)
+	{
+		avatar_picker->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
+		avatar_picker->navigateTo(gSavedSettings.getString("AvatarPickerURL"), "text/html");
+	}
 }
 
 // Destroy the UI
diff --git a/indra/newview/skins/default/xui/en/floater_avatar.xml b/indra/newview/skins/default/xui/en/floater_avatar.xml
new file mode 100644
index 00000000000..a0c1f4c0212
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_avatar.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="225"
+ can_minimize="true"
+ can_close="true"
+ user_resize="true"
+ can_resize="true"
+ min_height="230"
+ min_width="455"
+ max_height="230"
+ height="230"
+ layout="topleft"
+ name="Avatar"
+ single_instance="true"
+ help_topic="avatar"
+ save_rect="true"
+ title="Avatar Picker"
+ width="445">
+    <web_browser
+      top="25"
+      height="200"
+      width="435"
+      follows="all"
+      name="avatar_picker_contents"
+      trusted_content="true"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_destinations.xml b/indra/newview/skins/default/xui/en/floater_destinations.xml
index 50a279c046b..9dd9338f37d 100644
--- a/indra/newview/skins/default/xui/en/floater_destinations.xml
+++ b/indra/newview/skins/default/xui/en/floater_destinations.xml
@@ -6,6 +6,8 @@
  user_resize="true"
  can_resize="true"
  min_height="230"
+ min_width="525"
+ max_height="230"
  height="230"
  layout="topleft"
  name="Destinations"
-- 
GitLab