Skip to content

Commit 0c39bdf

Browse files
authored
Merge pull request #4442 from secondlife/geenz/main-to-2025.05
Geenz/main to 2025.05
2 parents 210f559 + af507ce commit 0c39bdf

11 files changed

+90
-51
lines changed

indra/newview/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,11 @@ set(viewer_SOURCE_FILES
179179
llflexibleobject.cpp
180180
llfloater360capture.cpp
181181
llfloaterabout.cpp
182+
llfloateravatarwelcomepack.cpp
182183
llfloaterbvhpreview.cpp
183184
llfloateraddpaymentmethod.cpp
184185
llfloaterauction.cpp
185186
llfloaterautoreplacesettings.cpp
186-
llfloateravatar.cpp
187187
llfloateravatarpicker.cpp
188188
llfloateravatarrendersettings.cpp
189189
llfloateravatartextures.cpp
@@ -851,11 +851,11 @@ set(viewer_HEADER_FILES
851851
llflexibleobject.h
852852
llfloater360capture.h
853853
llfloaterabout.h
854+
llfloateravatarwelcomepack.h
854855
llfloaterbvhpreview.h
855856
llfloateraddpaymentmethod.h
856857
llfloaterauction.h
857858
llfloaterautoreplacesettings.h
858-
llfloateravatar.h
859859
llfloateravatarpicker.h
860860
llfloateravatarrendersettings.h
861861
llfloateravatartextures.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: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -632,16 +632,16 @@
632632
<key>Value</key>
633633
<real>16.0</real>
634634
</map>
635-
<key>AvatarPickerURL</key>
635+
<key>AvatarWelcomePack</key>
636636
<map>
637-
<key>Comment</key>
638-
<string>Avatar picker contents</string>
639-
<key>Persist</key>
640-
<integer>1</integer>
641-
<key>Type</key>
642-
<string>String</string>
643-
<key>Value</key>
644-
<string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/avatars.html</string>
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>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/vawp/index.html</string>
645645
</map>
646646
<!--AvatarBakedTextureUploadTimeout is in use by QA-->
647647
<key>AvatarBakedTextureUploadTimeout</key>

indra/newview/llfloateravatar.cpp renamed to indra/newview/llfloateravatarwelcomepack.cpp

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* @file llfloateravatar.h
3-
* @author Leyla Farazha
4-
* @brief floater for the avatar changer
2+
* @file llfloateravatarwelcomepack.cpp
3+
* @author Callum Prentice ([email protected])
4+
* @brief Floater container for the Avatar Welcome Pack we app
55
*
66
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
77
* Second Life Viewer Source Code
@@ -27,17 +27,16 @@
2727

2828
#include "llviewerprecompiledheaders.h"
2929

30-
#include "llfloateravatar.h"
30+
#include "llfloateravatarwelcomepack.h"
3131
#include "lluictrlfactory.h"
3232
#include "llmediactrl.h"
3333

34-
35-
LLFloaterAvatar::LLFloaterAvatar(const LLSD& key)
34+
LLFloaterAvatarWelcomePack::LLFloaterAvatarWelcomePack(const LLSD& key)
3635
: LLFloater(key)
3736
{
3837
}
3938

40-
LLFloaterAvatar::~LLFloaterAvatar()
39+
LLFloaterAvatarWelcomePack::~LLFloaterAvatarWelcomePack()
4140
{
4241
if (mAvatarPicker)
4342
{
@@ -47,15 +46,13 @@ LLFloaterAvatar::~LLFloaterAvatar()
4746
}
4847
}
4948

50-
bool LLFloaterAvatar::postBuild()
49+
bool LLFloaterAvatarWelcomePack::postBuild()
5150
{
5251
mAvatarPicker = findChild<LLMediaCtrl>("avatar_picker_contents");
5352
if (mAvatarPicker)
5453
{
5554
mAvatarPicker->clearCache();
5655
}
57-
enableResizeCtrls(true, true, false);
56+
5857
return true;
5958
}
60-
61-

indra/newview/llfloateravatar.h renamed to indra/newview/llfloateravatarwelcomepack.h

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* @file llfloateravatar.h
3-
* @author Leyla Farazha
4-
* @brief floater for the avatar changer
2+
* @file llfloateravatarwelcomepack.h
3+
* @author Callum Prentice ([email protected])
4+
* @brief Floater container for the Avatar Welcome Pack we app
55
*
66
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
77
* Second Life Viewer Source Code
@@ -25,22 +25,21 @@
2525
* $/LicenseInfo$
2626
*/
2727

28-
#ifndef LL_FLOATER_AVATAR_H
29-
#define LL_FLOATER_AVATAR_H
28+
#pragma once
3029

3130
#include "llfloater.h"
31+
3232
class LLMediaCtrl;
3333

34-
class LLFloaterAvatar:
34+
class LLFloaterAvatarWelcomePack:
3535
public LLFloater
3636
{
3737
friend class LLFloaterReg;
38-
private:
39-
LLFloaterAvatar(const LLSD& key);
40-
~LLFloaterAvatar();
41-
bool postBuild() override;
4238

43-
LLMediaCtrl* mAvatarPicker;
44-
};
39+
private:
40+
LLFloaterAvatarWelcomePack(const LLSD& key);
41+
~LLFloaterAvatarWelcomePack();
42+
bool postBuild() override;
4543

46-
#endif
44+
LLMediaCtrl* mAvatarPicker;
45+
};

indra/newview/llstartup.cpp

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,9 +2103,6 @@ bool idle_startup()
21032103

21042104
do_startup_frame();
21052105

2106-
// We're successfully logged in.
2107-
gSavedSettings.setBOOL("FirstLoginThisInstall", false);
2108-
21092106
LLFloaterReg::showInitialVisibleInstances();
21102107

21112108
LLFloaterGridStatus::getInstance()->startGridStatusTimer();
@@ -2451,6 +2448,27 @@ bool idle_startup()
24512448

24522449
LLPerfStats::StatsRecorder::setAutotuneInit();
24532450

2451+
// Display Avatar Welcome Pack the first time a user logs in
2452+
// (or clears their settings....)
2453+
if (gSavedSettings.getBOOL("FirstLoginThisInstall"))
2454+
{
2455+
LLFloater* avatar_welcome_pack_floater = LLFloaterReg::findInstance("avatar_welcome_pack");
2456+
if (avatar_welcome_pack_floater != nullptr)
2457+
{
2458+
// There is a (very - 1 in ~50 times) hard to repro bug where the login
2459+
// page is not hidden when the AWP floater is presented. This (agressive)
2460+
// approach to always close it seems like the best fix for now.
2461+
LLPanelLogin::closePanel();
2462+
2463+
avatar_welcome_pack_floater->setVisible(true);
2464+
}
2465+
}
2466+
2467+
//// We're successfully logged in.
2468+
// 2025-06 Moved lower down in the state machine so the Avatar Welcome Pack
2469+
// floater display can be triggered correctly.
2470+
gSavedSettings.setBOOL("FirstLoginThisInstall", false);
2471+
24542472
return true;
24552473
}
24562474

indra/newview/llviewerfloaterreg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
#include "llfloateraddpaymentmethod.h"
3939
#include "llfloaterauction.h"
4040
#include "llfloaterautoreplacesettings.h"
41-
#include "llfloateravatar.h"
4241
#include "llfloateravatarpicker.h"
42+
#include "llfloateravatarwelcomepack.h"
4343
#include "llfloateravatarrendersettings.h"
4444
#include "llfloateravatartextures.h"
4545
#include "llfloaterbanduration.h"
@@ -331,8 +331,8 @@ void LLViewerFloaterReg::registerFloaters()
331331
LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
332332
LLFloaterReg::add("associate_listing", "floater_associate_listing.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAssociateListing>);
333333
LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
334-
LLFloaterReg::add("avatar", "floater_avatar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatar>);
335334
LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>);
335+
LLFloaterReg::add("avatar_welcome_pack", "floater_avatar_welcome_pack.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarWelcomePack>);
336336
LLFloaterReg::add("avatar_render_settings", "floater_avatar_render_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarRenderSettings>);
337337
LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>);
338338

indra/newview/llviewerwindow.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2291,13 +2291,13 @@ void LLViewerWindow::initWorldUI()
22912291
url = LLWeb::expandURLSubstitutions(url, LLSD());
22922292
destinations->navigateTo(url, HTTP_CONTENT_TEXT_HTML);
22932293
}
2294-
LLMediaCtrl* avatar_picker = LLFloaterReg::getInstance("avatar")->findChild<LLMediaCtrl>("avatar_picker_contents");
2295-
if (avatar_picker)
2294+
LLMediaCtrl* avatar_welcome_pack = LLFloaterReg::getInstance("avatar_welcome_pack")->findChild<LLMediaCtrl>("avatar_picker_contents");
2295+
if (avatar_welcome_pack)
22962296
{
2297-
avatar_picker->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
2298-
std::string url = gSavedSettings.getString("AvatarPickerURL");
2297+
avatar_welcome_pack->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
2298+
std::string url = gSavedSettings.getString("AvatarWelcomePack");
22992299
url = LLWeb::expandURLSubstitutions(url, LLSD());
2300-
avatar_picker->navigateTo(url, HTTP_CONTENT_TEXT_HTML);
2300+
avatar_welcome_pack->navigateTo(url, HTTP_CONTENT_TEXT_HTML);
23012301
}
23022302
}
23032303
}
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="438"
9+
min_width="530"
10+
height="438"
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="530">
18+
<web_browser
19+
top="25"
20+
height="438"
21+
width="530"
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

0 commit comments

Comments
 (0)