diff options
author | Jonathan Yap <none@none> | 2011-12-17 13:27:20 -0500 |
---|---|---|
committer | Jonathan Yap <none@none> | 2011-12-17 13:27:20 -0500 |
commit | 399bd5643cdec65b98b76556b16e3a00df6db1b2 (patch) | |
tree | d2ae04868bf883aa33c8d69cd671ed464171d049 | |
parent | b015ab4bd2296f86145e9567867227446cd1e10e (diff) |
STORM-653 As a user i would like to be able to see the available number of attachments and remaining free slots.
-rw-r--r-- | doc/contributions.txt | 1 | ||||
-rw-r--r-- | indra/newview/llcofwearables.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llcofwearables.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_cof_wearables.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 1 |
5 files changed, 19 insertions, 0 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt index 274632a804..24743777f7 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -595,6 +595,7 @@ Jonathan Yap STORM-1719 STORM-1712 STORM-1728 + STORM-653 Kadah Coba STORM-1060 Jondan Lundquist 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 { diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h index 1f8d6d0c94..9957d6a64e 100644 --- a/indra/newview/llcofwearables.h +++ b/indra/newview/llcofwearables.h @@ -91,6 +91,8 @@ public: */ void selectClothing(LLWearableType::EType clothing_type); + void setAttachmentsTitle(); + protected: void populateAttachmentsAndBodypartsLists(const LLInventoryModel::item_array_t& cof_items); diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml index beea53437a..aa8e3d07a6 100644 --- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml +++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml @@ -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" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index c25d1f57d6..30697278c3 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -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 --> |