Skip to content

Commit d8db0ff

Browse files
committed
First commit - bare bones of it working - pointing to test page on S3
1 parent de8275b commit d8db0ff

File tree

10 files changed

+157
-6
lines changed

10 files changed

+157
-6
lines changed

indra/newview/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ set(viewer_SOURCE_FILES
178178
llflexibleobject.cpp
179179
llfloater360capture.cpp
180180
llfloaterabout.cpp
181+
llfloateravatarwelcomepack.cpp
181182
llfloaterbvhpreview.cpp
182183
llfloateraddpaymentmethod.cpp
183184
llfloaterauction.cpp
@@ -849,6 +850,7 @@ set(viewer_HEADER_FILES
849850
llflexibleobject.h
850851
llfloater360capture.h
851852
llfloaterabout.h
853+
llfloateravatarwelcomepack.h
852854
llfloaterbvhpreview.h
853855
llfloateraddpaymentmethod.h
854856
llfloaterauction.h

indra/newview/app_settings/commands.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
label_ref="Command_Avatar_Label"
2727
tooltip_ref="Command_Avatar_Tooltip"
2828
execute_function="Floater.ToggleOrBringToFront"
29-
execute_parameters="avatar"
29+
execute_parameters="avatar_welcome_pack"
3030
is_running_function="Floater.IsOpen"
31-
is_running_parameters="avatar"
31+
is_running_parameters="avatar_welcome_pack"
3232
/>
3333
<command name="build"
3434
available_in_toybox="true"

indra/newview/app_settings/settings.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,17 @@
632632
<key>Value</key>
633633
<string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/avatars.html</string>
634634
</map>
635+
<key>AvatarWelcomePack</key>
636+
<map>
637+
<key>Comment</key>
638+
<string>Avatar Welcome Pack contents</string>
639+
<key>Persist</key>
640+
<integer>1</integer>
641+
<key>Type</key>
642+
<string>String</string>
643+
<key>Value</key>
644+
<string>https://sl-viewer-media-system.s3.amazonaws.com/vawp/index.html</string>
645+
</map>
635646
<!--AvatarBakedTextureUploadTimeout is in use by QA-->
636647
<key>AvatarBakedTextureUploadTimeout</key>
637648
<map>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/**
2+
* @file llfloateravatarwelcomepack.cpp
3+
* @author Callum Prentice ([email protected])
4+
* @brief Floater container for the Avatar Welcome Pack we app
5+
*
6+
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
7+
* Second Life Viewer Source Code
8+
* Copyright (C) 2011, Linden Research, Inc.
9+
*
10+
* This library is free software; you can redistribute it and/or
11+
* modify it under the terms of the GNU Lesser General Public
12+
* License as published by the Free Software Foundation;
13+
* version 2.1 of the License only.
14+
*
15+
* This library is distributed in the hope that it will be useful,
16+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18+
* Lesser General Public License for more details.
19+
*
20+
* You should have received a copy of the GNU Lesser General Public
21+
* License along with this library; if not, write to the Free Software
22+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23+
*
24+
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
25+
* $/LicenseInfo$
26+
*/
27+
28+
#include "llviewerprecompiledheaders.h"
29+
30+
#include "llfloateravatarwelcomepack.h"
31+
#include "lluictrlfactory.h"
32+
#include "llmediactrl.h"
33+
34+
LLFloaterAvatarWelcomePack::LLFloaterAvatarWelcomePack(const LLSD& key)
35+
: LLFloater(key)
36+
{
37+
}
38+
39+
LLFloaterAvatarWelcomePack::~LLFloaterAvatarWelcomePack()
40+
{
41+
if (mAvatarPicker)
42+
{
43+
mAvatarPicker->navigateStop();
44+
mAvatarPicker->clearCache(); //images are reloading each time already
45+
mAvatarPicker->unloadMediaSource();
46+
}
47+
}
48+
49+
bool LLFloaterAvatarWelcomePack::postBuild()
50+
{
51+
mAvatarPicker = findChild<LLMediaCtrl>("avatar_picker_contents");
52+
if (mAvatarPicker)
53+
{
54+
mAvatarPicker->clearCache();
55+
}
56+
57+
return true;
58+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* @file llfloateravatarwelcomepack.h
3+
* @author Callum Prentice ([email protected])
4+
* @brief Floater container for the Avatar Welcome Pack we app
5+
*
6+
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
7+
* Second Life Viewer Source Code
8+
* Copyright (C) 2011, Linden Research, Inc.
9+
*
10+
* This library is free software; you can redistribute it and/or
11+
* modify it under the terms of the GNU Lesser General Public
12+
* License as published by the Free Software Foundation;
13+
* version 2.1 of the License only.
14+
*
15+
* This library is distributed in the hope that it will be useful,
16+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18+
* Lesser General Public License for more details.
19+
*
20+
* You should have received a copy of the GNU Lesser General Public
21+
* License along with this library; if not, write to the Free Software
22+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23+
*
24+
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
25+
* $/LicenseInfo$
26+
*/
27+
28+
#pragma once
29+
30+
#include "llfloater.h"
31+
32+
class LLMediaCtrl;
33+
34+
class LLFloaterAvatarWelcomePack:
35+
public LLFloater
36+
{
37+
friend class LLFloaterReg;
38+
39+
private:
40+
LLFloaterAvatarWelcomePack(const LLSD& key);
41+
~LLFloaterAvatarWelcomePack();
42+
bool postBuild() override;
43+
44+
LLMediaCtrl* mAvatarPicker;
45+
};

indra/newview/llviewerfloaterreg.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include "llfloaterautoreplacesettings.h"
4141
#include "llfloateravatar.h"
4242
#include "llfloateravatarpicker.h"
43+
#include "llfloateravatarwelcomepack.h"
4344
#include "llfloateravatarrendersettings.h"
4445
#include "llfloateravatartextures.h"
4546
#include "llfloaterbanduration.h"
@@ -333,6 +334,7 @@ void LLViewerFloaterReg::registerFloaters()
333334
LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
334335
LLFloaterReg::add("avatar", "floater_avatar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatar>);
335336
LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>);
337+
LLFloaterReg::add("avatar_welcome_pack", "floater_avatar_welcome_pack.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarWelcomePack>);
336338
LLFloaterReg::add("avatar_render_settings", "floater_avatar_render_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarRenderSettings>);
337339
LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>);
338340

indra/newview/llviewerwindow.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,14 @@ void LLViewerWindow::initWorldUI()
22992299
url = LLWeb::expandURLSubstitutions(url, LLSD());
23002300
avatar_picker->navigateTo(url, HTTP_CONTENT_TEXT_HTML);
23012301
}
2302+
LLMediaCtrl* avatar_welcome_pack = LLFloaterReg::getInstance("avatar_welcome_pack")->findChild<LLMediaCtrl>("avatar_picker_contents");
2303+
if (avatar_welcome_pack)
2304+
{
2305+
avatar_welcome_pack->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
2306+
std::string url = gSavedSettings.getString("AvatarWelcomePack");
2307+
url = LLWeb::expandURLSubstitutions(url, LLSD());
2308+
avatar_welcome_pack->navigateTo(url, HTTP_CONTENT_TEXT_HTML);
2309+
}
23022310
}
23032311
}
23042312

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2+
<floater
3+
positioning="cascading"
4+
legacy_header_height="225"
5+
can_minimize="true"
6+
can_close="true"
7+
can_resize="false"
8+
min_height="600"
9+
min_width="800"
10+
height="600"
11+
layout="topleft"
12+
name="Avatar Welcome Pack"
13+
single_instance="true"
14+
save_rect="true"
15+
save_visibility="true"
16+
title="AVATAR WELCOME PACK"
17+
width="800">
18+
<web_browser
19+
top="25"
20+
height="600"
21+
width="800"
22+
follows="all"
23+
name="avatar_picker_contents"
24+
trusted_content="true"/>
25+
</floater>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,11 +411,11 @@
411411
</menu_item_call>
412412
<menu_item_separator/>
413413
<menu_item_call
414-
label="Complete avatars..."
415-
name="Avatar Picker">
414+
label="Avatar Welcome Pack..."
415+
name="Avatar Welcome Pack">
416416
<menu_item_call.on_click
417417
function="Floater.ToggleOrBringToFront"
418-
parameter="avatar" />
418+
parameter="avatar_welcome_pack" />
419419
</menu_item_call>
420420
<menu_item_separator/>
421421

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4186,7 +4186,7 @@ Try enclosing path to the editor with double quotes.
41864186
name="Command_360_Capture_Label">360 snapshot</string>
41874187
<string name="Command_AboutLand_Label">About land</string>
41884188
<string name="Command_Appearance_Label">Outfits</string>
4189-
<string name="Command_Avatar_Label">Complete avatars</string>
4189+
<string name="Command_Avatar_Label">Avatar Welcome Pack</string>
41904190
<string name="Command_Build_Label">Build</string>
41914191
<string name="Command_Chat_Label">Chat</string>
41924192
<string name="Command_Conversations_Label">Conversations</string>

0 commit comments

Comments
 (0)