summaryrefslogtreecommitdiff
path: root/indra/newview/llcofwearables.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-01-03 10:38:06 -0800
committerTodd Stinson <stinson@lindenlab.com>2012-01-03 10:38:06 -0800
commit3fd7752f1289f67db93e76833cc9804d057bc3c8 (patch)
tree4fe65b7a3c80b065aa19e4904ea8e0d0d0e56940 /indra/newview/llcofwearables.cpp
parentd1e79837d1b07cec0297a20e3cb63a47b136d844 (diff)
parent570d562f5871f40bd7f8c683db5316ffd0133335 (diff)
Pull and merge from https://bitbucket.org/lindenlab/viewer-development.
Diffstat (limited to 'indra/newview/llcofwearables.cpp')
-rw-r--r--indra/newview/llcofwearables.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index 54598f90c8..e9c7a3fa03 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -328,6 +328,19 @@ BOOL LLCOFWearables::postBuild()
return LLPanel::postBuild();
}
+void LLCOFWearables::setAttachmentsTitle()
+{
+ if (mAttachmentsTab)
+ {
+ U32 free_slots = MAX_AGENT_ATTACHMENTS - mAttachments->size();
+
+ LLStringUtil::format_map_t args_attachments;
+ args_attachments["[COUNT]"] = llformat ("%d", free_slots);
+ std::string attachments_title = LLTrans::getString("Attachments remain", args_attachments);
+ mAttachmentsTab->setTitle(attachments_title);
+ }
+}
+
void LLCOFWearables::onSelectionChange(LLFlatListView* selected_list)
{
if (!selected_list) return;
@@ -490,6 +503,7 @@ void LLCOFWearables::populateAttachmentsAndBodypartsLists(const LLInventoryModel
{
mAttachments->sort();
mAttachments->notify(REARRANGE); //notifying the parent about the list's size change (cause items were added with rearrange=false)
+ setAttachmentsTitle();
}
else
{