|
46 | 46 |
|
47 | 47 | #include "llagent.h" |
48 | 48 | #include "llavataractions.h" |
| 49 | +#include "llavatarpropertiesprocessor.h" |
49 | 50 | #include "llcallingcard.h" |
50 | 51 | #include "lldroptarget.h" |
51 | 52 | #include "llfloatergroupinfo.h" |
@@ -183,56 +184,11 @@ void LLPanelAvatarSecondLife::processProperties(void* data, EAvatarProcessorType |
183 | 184 | if (pAvatarData && (mAvatarID == pAvatarData->avatar_id) && (pAvatarData->avatar_id != LLUUID::null)) |
184 | 185 | { |
185 | 186 | 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]"] = " "; |
234 | 190 |
|
235 | | - childSetValue("acct", caption_text); |
| 191 | + getChild<LLUICtrl>("acct")->setValue(getString("CaptionTextAcctInfo", args)); |
236 | 192 |
|
237 | 193 | getChild<LLTextureCtrl>("img")->setImageAssetID(pAvatarData->image_id); |
238 | 194 |
|
|
0 commit comments