diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-03-26 16:32:38 +0200 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-03-26 16:32:38 +0200 |
commit | 35b5b5e2a3dceaf98fdf770d971c45b1c80116ed (patch) | |
tree | 3f34f5deff668a9a0001f79560b3823dd48d6f49 /indra/newview/llpanelmaininventory.cpp | |
parent | e962b8418f8a37c1d18743c31199dd9c33d5c74b (diff) | |
parent | 379517ce5e1535b20a94ef3a581e1b25223f8798 (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 421c9df9a1..d40141c91d 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -44,6 +44,7 @@ #include "llfiltereditor.h" #include "llfloaterreg.h" #include "llpreviewtexture.h" +#include "llresmgr.h" #include "llscrollcontainer.h" #include "llsdserialize.h" #include "llspinctrl.h" @@ -538,7 +539,7 @@ BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // virtual void LLPanelMainInventory::changed(U32) { - // empty, but must have this defined for abstract base class. + updateItemcountText(); } @@ -550,6 +551,34 @@ void LLPanelMainInventory::draw() mFilterEditor->setText(mFilterSubString); } LLPanel::draw(); + updateItemcountText(); +} + +void LLPanelMainInventory::updateItemcountText() +{ + LLLocale locale(LLLocale::USER_LOCALE); + std::string item_count_string; + LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount()); + + LLStringUtil::format_map_t string_args; + string_args["[ITEM_COUNT]"] = item_count_string; + string_args["[FILTER]"] = getFilterText(); + + std::string text = ""; + + if (LLInventoryModel::backgroundFetchActive()) + { + text = getString("ItemcountFetching", string_args); + } + else if (LLInventoryModel::isEverythingFetched()) + { + text = getString("ItemcountCompleted", string_args); + } + else + { + text = getString("ItemcountUnknown"); + } + childSetText("ItemcountText",text); } void LLPanelMainInventory::setFilterTextFromFilter() |