Skip to content

Commit 08654cc

Browse files
committed
Fixed profile floater not displaying custom account type strings from server
1 parent 3f1d05b commit 08654cc

3 files changed

Lines changed: 20 additions & 80 deletions

File tree

indra/newview/llpanelavatar.cpp

Lines changed: 5 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

4747
#include "llagent.h"
4848
#include "llavataractions.h"
49+
#include "llavatarpropertiesprocessor.h"
4950
#include "llcallingcard.h"
5051
#include "lldroptarget.h"
5152
#include "llfloatergroupinfo.h"
@@ -183,56 +184,11 @@ void LLPanelAvatarSecondLife::processProperties(void* data, EAvatarProcessorType
183184
if (pAvatarData && (mAvatarID == pAvatarData->avatar_id) && (pAvatarData->avatar_id != LLUUID::null))
184185
{
185186
LLStringUtil::format_map_t args;
186-
187-
U8 caption_index = 0;
188-
std::string caption_text = getString("CaptionTextAcctInfo");
189-
190-
const char* ACCT_TYPE[] =
191-
{
192-
"AcctTypeResident",
193-
"AcctTypeTrial",
194-
"AcctTypeCharterMember",
195-
"AcctTypeEmployee"
196-
};
197-
198-
199-
caption_index = llclamp(caption_index, (U8)0, (U8)(LL_ARRAY_SIZE(ACCT_TYPE)-1));
200-
args["[ACCTTYPE]"] = getString(ACCT_TYPE[caption_index]);
201-
202-
std::string payment_text = " ";
203-
const S32 DEFAULT_CAPTION_LINDEN_INDEX = 3;
204-
if(caption_index != DEFAULT_CAPTION_LINDEN_INDEX)
205-
{
206-
if(pAvatarData->flags & AVATAR_TRANSACTED)
207-
{
208-
payment_text = "PaymentInfoUsed";
209-
}
210-
else if (pAvatarData->flags & AVATAR_IDENTIFIED)
211-
{
212-
payment_text = "PaymentInfoOnFile";
213-
}
214-
else
215-
{
216-
payment_text = "NoPaymentInfoOnFile";
217-
}
218-
args["[PAYMENTINFO]"] = getString(payment_text);
219-
220-
// Do not display age verification status at this time - Mostly because it /doesn't work/. -HgB
221-
/*bool age_verified = (pAvatarData->flags & AVATAR_AGEVERIFIED); // Not currently getting set in dataserver/lldataavatar.cpp for privacy consideration
222-
std::string age_text = age_verified ? "AgeVerified" : "NotAgeVerified";
223-
224-
args["[AGEVERIFICATION]"] = getString(age_text);
225-
*/
226-
args["[AGEVERIFICATION]"] = " ";
227-
}
228-
else
229-
{
230-
args["[PAYMENTINFO]"] = " ";
231-
args["[AGEVERIFICATION]"] = " ";
232-
}
233-
LLStringUtil::format(caption_text, args);
187+
args["[ACCTTYPE]"] = LLAvatarPropertiesProcessor::accountType(pAvatarData);
188+
args["[PAYMENTINFO]"] = LLAvatarPropertiesProcessor::paymentInfo(pAvatarData);
189+
args["[AGEVERIFICATION]"] = " ";
234190

235-
childSetValue("acct", caption_text);
191+
getChild<LLUICtrl>("acct")->setValue(getString("CaptionTextAcctInfo", args));
236192

237193
getChild<LLTextureCtrl>("img")->setImageAssetID(pAvatarData->image_id);
238194

indra/newview/skins/default/xui/en-us/panel_avatar.xml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,6 @@
99
[PAYMENTINFO]
1010
[AGEVERIFICATION]
1111
</string>
12-
<string name="AcctTypeResident">
13-
Resident
14-
</string>
15-
<string name="AcctTypeTrial">
16-
Trial
17-
</string>
18-
<string name="AcctTypeCharterMember">
19-
Charter Member
20-
</string>
21-
<string name="AcctTypeEmployee">
22-
Linden Lab Employee
23-
</string>
24-
<string name="PaymentInfoUsed">
25-
Payment Info Used
26-
</string>
27-
<string name="PaymentInfoOnFile">
28-
Payment Info On File
29-
</string>
30-
<string name="NoPaymentInfoOnFile">
31-
No Payment Info On File
32-
</string>
33-
<string name="AgeVerified">
34-
Age-verified
35-
</string>
36-
<string name="NotAgeVerified">
37-
Not Age-verified
38-
</string>
3912
<button bottom="-24" follows="left|top" halign="right" height="16" label="Copy Key:" left="4" font="SansSerifSmall" tool_tip="Copy key to clipboard" name="copy_key" width="70"/>
4013
<name_editor bevel_style="in" border_style="line"
4114
border_thickness="1" bottom="-24" enabled="false" follows="left|top"

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

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3205,10 +3205,21 @@ The
32053205
<string name="Stomach">Stomach</string>
32063206
<string name="Left Pec">Left Pec</string>
32073207
<string name="Right Pec">Right Pec</string>
3208-
<string name="Neck">Neck</string>
3209-
<string name="Root">Root</string>
3210-
<string name="Invalid Attachment">Invalid Attachment Point</string>
3211-
3208+
<string name="Neck">Neck</string>
3209+
<string name="Root">Root</string>
3210+
<string name="Invalid Attachment">Invalid Attachment Point</string>
3211+
3212+
<!-- Account types, see LLAvatarPropertiesProcessor -->
3213+
<string name="AcctTypeResident">Resident</string>
3214+
<string name="AcctTypeTrial">Trial</string>
3215+
<string name="AcctTypeCharterMember">Charter Member</string>
3216+
<string name="AcctTypeEmployee">Linden Lab Employee</string>
3217+
<string name="PaymentInfoUsed">Payment Info Used</string>
3218+
<string name="PaymentInfoOnFile">Payment Info On File</string>
3219+
<string name="NoPaymentInfoOnFile">No Payment Info On File</string>
3220+
<string name="AgeVerified">Age-verified</string>
3221+
<string name="NotAgeVerified">Not Age-verified</string>
3222+
32123223
<!-- HUD Position -->
32133224
<string name="Center 2">Center 2</string>
32143225
<string name="Top Right">Top Right</string>

0 commit comments

Comments
 (0)