summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelprofile.cpp18
-rw-r--r--indra/newview/llpanelprofilepicks.cpp33
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_secondlife.xml19
3 files changed, 51 insertions, 19 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index f608712133..cb10dd75fb 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -1238,12 +1238,20 @@ void LLPanelProfileSecondLife::fillRightsData()
void LLPanelProfileSecondLife::fillNameAgeData(const LLAvatarName &av_name, const LLDate &born_on)
{
- LLStringUtil::format_map_t args;
- args["[AGE]"] = LLDateUtil::ageFromDate(born_on, LLDate::now());
- args["[NAME]"] = av_name.getAccountName();
- std::string register_date = getString("NameAgeFormat", args);
- getChild<LLUICtrl>("user_name_age")->setValue(register_date);
getChild<LLUICtrl>("display_name")->setValue(av_name.getDisplayName());
+
+ std::string name_and_date = getString("name_date_format");
+ LLSD args_name;
+ args_name["datetime"] = (S32)born_on.secondsSinceEpoch();
+ args_name["[NAME]"] = av_name.getAccountName();
+ LLStringUtil::format(name_and_date, args_name);
+ getChild<LLUICtrl>("user_name_date")->setValue(name_and_date);
+
+ std::string register_date = getString("age_format");
+ LLSD args_age;
+ args_age["[AGE]"] = LLDateUtil::ageFromDate(born_on, LLDate::now());
+ LLStringUtil::format(register_date, args_age);
+ getChild<LLUICtrl>("user_age")->setValue(register_date);
}
void LLPanelProfileSecondLife::onImageLoaded(BOOL success, LLViewerFetchedTexture *imagep)
diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp
index 7142051f17..69f6ac0407 100644
--- a/indra/newview/llpanelprofilepicks.cpp
+++ b/indra/newview/llpanelprofilepicks.cpp
@@ -152,16 +152,25 @@ void LLPanelProfilePicks::createPick(const LLPickData &data)
{
if (getIsLoaded())
{
- mNoItemsLabel->setVisible(FALSE);
- LLPanelProfilePick* pick_panel = LLPanelProfilePick::create();
- pick_panel->setAvatarId(getAvatarId());
- pick_panel->processProperties(&data);
- mTabContainer->addTabPanel(
- LLTabContainer::TabPanelParams().
- panel(pick_panel).
- select_tab(true).
- label(pick_panel->getPickName()));
- updateButtons();
+ if (canAddNewPick())
+ {
+ mNoItemsLabel->setVisible(FALSE);
+ LLPanelProfilePick* pick_panel = LLPanelProfilePick::create();
+ pick_panel->setAvatarId(getAvatarId());
+ pick_panel->processProperties(&data);
+ mTabContainer->addTabPanel(
+ LLTabContainer::TabPanelParams().
+ panel(pick_panel).
+ select_tab(true).
+ label(pick_panel->getPickName()));
+ updateButtons();
+ }
+ else
+ {
+ // This means that something doesn't properly check limits
+ // before creating a pick
+ LL_WARNS() << "failed to add pick" << LL_ENDL;
+ }
}
else
{
@@ -313,7 +322,7 @@ void LLPanelProfilePicks::processProperties(const LLAvatarPicks* avatar_picks)
}
}
- while (!mSheduledPickCreation.empty())
+ while (!mSheduledPickCreation.empty() && canAddNewPick())
{
const LLPickData data =
mSheduledPickCreation.back();
@@ -331,6 +340,8 @@ void LLPanelProfilePicks::processProperties(const LLAvatarPicks* avatar_picks)
has_selection = true;
}
+ mSheduledPickCreation.clear();
+
BOOL no_data = !mTabContainer->getTabCount();
mNoItemsLabel->setVisible(no_data);
if (no_data)
diff --git a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
index 7dd16de0ed..63136fd6a4 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
@@ -10,8 +10,11 @@
layout="topleft"
>
<string
- name="NameAgeFormat"
- value="[NAME] ([AGE])" />
+ name="name_date_format"
+ value="[NAME], [mth,datetime,slt] [day,datetime,slt], [year,datetime,slt]" />
+ <string
+ name="age_format"
+ value="[AGE]" />
<string
name="partner_text"
value="Partner: [LINK]" />
@@ -99,7 +102,17 @@ Account: [ACCTTYPE]
layout="topleft"/>
<text
- name="user_name_age"
+ name="user_name_date"
+ value="(loading...)"
+ top_pad="0"
+ left_delta="0"
+ right="-1"
+ height="16"
+ follows="left|top|right"
+ layout="topleft"/>
+
+ <text
+ name="user_age"
value="(loading...)"
top_pad="0"
left_delta="0"