Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
1c2013a4
Commit
1c2013a4
authored
2 months ago
by
Botnet4U
Browse files
Options
Downloads
Patches
Plain Diff
Extend profile badge handling in legacy profiles
parent
02bcdac2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llpanelprofilelegacy.cpp
+32
-22
32 additions, 22 deletions
indra/newview/llpanelprofilelegacy.cpp
indra/newview/skins/default/xui/en/panel_profile_legacy_secondlife.xml
+2
-25
2 additions, 25 deletions
.../skins/default/xui/en/panel_profile_legacy_secondlife.xml
with
34 additions
and
47 deletions
indra/newview/llpanelprofilelegacy.cpp
+
32
−
22
View file @
1c2013a4
...
...
@@ -31,6 +31,8 @@
#include
"llviewerprecompiledheaders.h"
#include
"llpanelprofilelegacy.h"
#include
<boost/algorithm/string/predicate.hpp>
// for boost::iequals
// libraries
#include
"llaccordionctrl.h"
#include
"llaccordionctrltab.h"
...
...
@@ -83,6 +85,8 @@ static LLPanelInjector<LLPanelProfileLegacy> t_panel_lprofile("panel_profile_leg
static
LLPanelInjector
<
LLPanelProfileLegacy
::
LLPanelProfileGroups
>
t_panel_group
(
"panel_profile_legacy_groups"
);
static
LLPanelInjector
<
LLPanelProfileLegacy
::
LLPanelProfilePicks
>
t_panel_picks
(
"panel_profile_legacy_picks"
);
static
LLDate
sSecondLifeRelease
=
LLDate
(
"2003-06-23T00:00:00"
);
LLPanelProfileLegacy
::
LLPanelProfileLegacy
()
:
LLPanelProfileLegacyTab
()
,
mPanelPicks
(
nullptr
)
...
...
@@ -235,7 +239,7 @@ void LLPanelProfileLegacy::updateData()
{
setProgress
(
true
);
const
std
::
string
cap_url
=
gAgent
.
getRegionCapability
(
AGENT_PROFILE_CAP
);
const
std
::
string
&
cap_url
=
gAgent
.
getRegionCapability
(
AGENT_PROFILE_CAP
);
if
(
!
cap_url
.
empty
())
{
const
auto
&
agent_id
=
getAvatarId
();
...
...
@@ -273,7 +277,7 @@ void LLPanelProfileLegacy::updateData()
return
;
}
LLPanelProfileLegacy
*
legacy_sidetray
=
(
LLPanelProfileLegacy
*
)
handle
.
get
();
LLPanelProfileLegacy
*
legacy_sidetray
=
static_cast
<
LLPanelProfileLegacy
*
>
(
handle
.
get
()
)
;
if
(
!
legacy_sidetray
)
{
return
;
...
...
@@ -367,39 +371,45 @@ void LLPanelProfileLegacy::updateData()
legacy_sidetray
->
processProperties
(
&
avatar_picks
,
APT_PICKS
);
// bonus time...
LLIconCtrl
*
badge
=
legacy_sidetray
->
getChild
<
LLIconCtrl
>
(
"badge_icon"
);
if
(
result
.
has
(
"customer_type"
))
{
LLUICtrl
*
internal_icon
=
legacy_sidetray
->
getChild
<
LLUICtrl
>
(
"account_type_internal"
);
LLUICtrl
*
premium_icon
=
legacy_sidetray
->
getChild
<
LLUICtrl
>
(
"account_type_premium"
);
LLUICtrl
*
plus_icon
=
legacy_sidetray
->
getChild
<
LLUICtrl
>
(
"account_type_plus"
);
const
std
::
string
&
type
=
result
[
"customer_type"
].
asStringRef
();
if
(
type
==
"Internal"
)
if
(
boost
::
iequals
(
type
,
"Internal"
))
{
badge
->
setValue
(
"Profile_Badge_Linden"
);
}
else
if
(
avatar_data
.
born_on
<
sSecondLifeRelease
)
{
badge
->
setValue
(
"Profile_Badge_Beta"
);
}
else
if
(
boost
::
iequals
(
type
,
"Beta_Lifetime"
))
{
internal_icon
->
setVisible
(
true
);
premium_icon
->
setVisible
(
false
);
plus_icon
->
setVisible
(
false
);
badge
->
setValue
(
"Profile_Badge_Beta_Lifetime"
);
}
else
if
(
type
==
"Monthly"
||
type
==
"Quarterly"
||
type
==
"Annual
"
)
else
if
(
boost
::
iequals
(
type
,
"Lifetime
"
)
)
{
internal_icon
->
setVisible
(
false
);
premium_icon
->
setVisible
(
true
);
plus_icon
->
setVisible
(
false
);
badge
->
setValue
(
"Profile_Badge_Lifetime"
);
}
else
if
(
boost
::
iequals
(
type
,
"Monthly"
)
||
boost
::
iequals
(
type
,
"Quarterly"
)
||
boost
::
iequals
(
type
,
"Annual"
))
{
badge
->
setValue
(
"AccountLevel_Premium"
);
}
else
if
(
type
.
substr
(
0
,
12
)
==
"Premium_Plus"
)
{
internal_icon
->
setVisible
(
false
);
premium_icon
->
setVisible
(
false
);
plus_icon
->
setVisible
(
true
);
badge
->
setValue
(
"AccountLevel_Plus"
);
}
else
/* if (type == "Base") */
{
internal_icon
->
setVisible
(
false
);
premium_icon
->
setVisible
(
false
);
plus_icon
->
setVisible
(
false
);
badge
->
setValue
(
""
);
}
}
else
{
badge
->
setValue
(
""
);
}
});
}
...
...
@@ -412,7 +422,7 @@ void LLPanelProfileLegacy::updateData()
getChild
<
LLLayoutPanel
>
(
"avatar_perm"
)
->
setVisible
(
is_other
);
if
(
is_other
)
{
S32
rights
=
relation
->
getRightsGrantedTo
();
const
S32
rights
=
relation
->
getRightsGrantedTo
();
getChild
<
LLCheckBoxCtrl
>
(
"allow_show_online"
)
->
setValue
(
rights
&
LLRelationship
::
GRANT_ONLINE_STATUS
?
TRUE
:
FALSE
);
getChild
<
LLCheckBoxCtrl
>
(
"allow_mapping"
)
->
setValue
(
rights
&
LLRelationship
::
GRANT_MAP_LOCATION
?
TRUE
:
FALSE
);
getChild
<
LLCheckBoxCtrl
>
(
"allow_object_perms"
)
->
setValue
(
rights
&
LLRelationship
::
GRANT_MODIFY_OBJECTS
?
TRUE
:
FALSE
);
...
...
@@ -451,7 +461,7 @@ void LLPanelProfileLegacy::sendAvatarProfileCoro(std::string url, LLSD payload)
LL_DEBUGS
(
"LegacyProfiles"
)
<<
"Agent id: "
<<
getAvatarId
()
<<
" Payload: "
<<
payload
<<
" Result: "
<<
httpResults
<<
LL_ENDL
;
}
void
LLPanelProfileLegacy
::
processProperties
(
void
*
data
,
EAvatarProcessorType
type
)
void
LLPanelProfileLegacy
::
processProperties
(
void
*
data
,
const
EAvatarProcessorType
type
)
{
if
(
!
data
)
return
;
switch
(
type
)
...
...
This diff is collapsed.
Click to expand it.
indra/newview/skins/default/xui/en/panel_profile_legacy_secondlife.xml
+
2
−
25
View file @
1c2013a4
...
...
@@ -86,35 +86,12 @@
<icon
follows=
"right|top"
height=
"14"
visible=
"false"
image_name=
"AccountLevel_Internal"
layout=
"topleft"
right=
"-1"
top_delta=
"0"
mouse_opaque=
"false"
name=
"account_type_internal"
width=
"14"
/>
<icon
follows=
"right|top"
height=
"14"
visible=
"false"
image_name=
"AccountLevel_Premium"
layout=
"topleft"
right=
"-1"
top_delta=
"0"
mouse_opaque=
"false"
name=
"account_type_premium"
width=
"14"
/>
<icon
follows=
"right|top"
height=
"14"
visible=
"false"
image_name=
"AccountLevel_Plus"
image_name=
""
layout=
"topleft"
right=
"-1"
top_delta=
"0"
mouse_opaque=
"false"
name=
"
account_type_plus
"
name=
"
badge_icon
"
width=
"14"
/>
<text
font=
"SansSerifSmall"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment