STORM-653 As a user i would like to be able to see the available number of attachments and remaining free slots.

master
Jonathan Yap 2011-12-17 13:27:20 -05:00
parent b015ab4bd2
commit 399bd5643c
5 changed files with 19 additions and 0 deletions

View File

@ -595,6 +595,7 @@ Jonathan Yap
STORM-1719
STORM-1712
STORM-1728
STORM-653
Kadah Coba
STORM-1060
Jondan Lundquist

View File

@ -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
{

View File

@ -91,6 +91,8 @@ public:
*/
void selectClothing(LLWearableType::EType clothing_type);
void setAttachmentsTitle();
protected:
void populateAttachmentsAndBodypartsLists(const LLInventoryModel::item_array_t& cof_items);

View File

@ -37,6 +37,7 @@
top="0"
width="311" />
</accordion_tab>
<!-- The Attachments title is overwritten by the definition of "Attachments remain" in strings.xml -->
<accordion_tab
layout="topleft"
name="tab_attachments"

View File

@ -2133,6 +2133,7 @@ Returns a string with the requested data about the region
<string name="InvFolder All">All</string>
<string name="no_attachments">No attachments worn</string>
<string name="Attachments remain">Attachments ([COUNT] slots remain)</string>
<!-- inventory FVBridge -->
<!-- This is used in llpanelinventory.cpp when constructing a context menu for an item for Sale -->