summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelmaininventory.cpp102
-rw-r--r--indra/newview/llpanelmaininventory.h5
-rw-r--r--indra/newview/skins/default/textures/map_avatar_you_32.tgabin3395 -> 4140 bytes
3 files changed, 68 insertions, 39 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 2466ee5973..0c068ff993 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -963,59 +963,87 @@ void LLPanelMainInventory::draw()
void LLPanelMainInventory::updateItemcountText()
{
- if(mItemCount != gInventory.getItemCount())
- {
- mItemCount = gInventory.getItemCount();
- mItemCountString = "";
- LLLocale locale(LLLocale::USER_LOCALE);
- LLResMgr::getInstance()->getIntegerString(mItemCountString, mItemCount);
- }
-
- if(mCategoryCount != gInventory.getCategoryCount())
+ bool update = false;
+ if (mSingleFolderMode)
{
- mCategoryCount = gInventory.getCategoryCount();
- mCategoryCountString = "";
- LLLocale locale(LLLocale::USER_LOCALE);
- LLResMgr::getInstance()->getIntegerString(mCategoryCountString, mCategoryCount);
- }
-
- LLStringUtil::format_map_t string_args;
- string_args["[ITEM_COUNT]"] = mItemCountString;
- string_args["[CATEGORY_COUNT]"] = mCategoryCountString;
- string_args["[FILTER]"] = getFilterText();
+ LLInventoryModel::cat_array_t* cats;
+ LLInventoryModel::item_array_t* items;
- std::string text = "";
+ gInventory.getDirectDescendentsOf(getCurrentSFVRoot(), cats, items);
+ S32 item_count = items ? (S32)items->size() : 0;
+ S32 cat_count = cats ? (S32)cats->size() : 0;
- if (LLInventoryModelBackgroundFetch::instance().folderFetchActive())
- {
- text = getString("ItemcountFetching", string_args);
+ if (mItemCount != item_count)
+ {
+ mItemCount = item_count;
+ update = true;
+ }
+ if (mCategoryCount != cat_count)
+ {
+ mCategoryCount = cat_count;
+ update = true;
+ }
}
- else if (LLInventoryModelBackgroundFetch::instance().isEverythingFetched())
+ else
{
- text = getString("ItemcountCompleted", string_args);
+ if (mItemCount != gInventory.getItemCount())
+ {
+ mItemCount = gInventory.getItemCount();
+ update = true;
+ }
+
+ if (mCategoryCount != gInventory.getCategoryCount())
+ {
+ mCategoryCount = gInventory.getCategoryCount();
+ update = true;
+ }
}
- else
+
+ if (mLastFilterText != getFilterText())
{
- text = getString("ItemcountUnknown", string_args);
+ mLastFilterText = getFilterText();
+ update = true;
}
- if (mSingleFolderMode)
+ if (update)
{
- LLInventoryModel::cat_array_t *cats;
- LLInventoryModel::item_array_t *items;
+ mItemCountString = "";
+ LLLocale locale(LLLocale::USER_LOCALE);
+ LLResMgr::getInstance()->getIntegerString(mItemCountString, mItemCount);
- gInventory.getDirectDescendentsOf(getCurrentSFVRoot(), cats, items);
+ mCategoryCountString = "";
+ LLResMgr::getInstance()->getIntegerString(mCategoryCountString, mCategoryCount);
- if (items && cats)
+ LLStringUtil::format_map_t string_args;
+ string_args["[ITEM_COUNT]"] = mItemCountString;
+ string_args["[CATEGORY_COUNT]"] = mCategoryCountString;
+ string_args["[FILTER]"] = mLastFilterText;
+
+ std::string text = "";
+
+ if (mSingleFolderMode)
{
- string_args["[ITEM_COUNT]"] = llformat("%d", items->size());
- string_args["[CATEGORY_COUNT]"] = llformat("%d", cats->size());
text = getString("ItemcountCompleted", string_args);
}
- }
+ else
+ {
+ if (LLInventoryModelBackgroundFetch::instance().folderFetchActive())
+ {
+ text = getString("ItemcountFetching", string_args);
+ }
+ else if (LLInventoryModelBackgroundFetch::instance().isEverythingFetched())
+ {
+ text = getString("ItemcountCompleted", string_args);
+ }
+ else
+ {
+ text = getString("ItemcountUnknown", string_args);
+ }
+ }
- mCounterCtrl->setValue(text);
- mCounterCtrl->setToolTip(text);
+ mCounterCtrl->setValue(text);
+ mCounterCtrl->setToolTip(text);
+ }
}
void LLPanelMainInventory::onFocusReceived()
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index 3347ab904b..d28daddd73 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -196,9 +196,10 @@ private:
LLSaveFolderState* mSavedFolderState;
std::string mFilterText;
std::string mFilterSubString;
- S32 mItemCount;
+ S32 mItemCount = 0;
+ std::string mLastFilterText;
std::string mItemCountString;
- S32 mCategoryCount;
+ S32 mCategoryCount = 0;
std::string mCategoryCountString;
LLComboBox* mSearchTypeCombo;
diff --git a/indra/newview/skins/default/textures/map_avatar_you_32.tga b/indra/newview/skins/default/textures/map_avatar_you_32.tga
index 782207efd6..84b57aceaf 100644
--- a/indra/newview/skins/default/textures/map_avatar_you_32.tga
+++ b/indra/newview/skins/default/textures/map_avatar_you_32.tga
Binary files differ