summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfloaterinventory.cpp36
-rw-r--r--indra/newview/llfloaterinventory.h4
-rw-r--r--indra/newview/llpanelmaininventory.cpp31
-rw-r--r--indra/newview/llpanelmaininventory.h3
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory.xml16
-rw-r--r--indra/newview/skins/default/xui/en/panel_main_inventory.xml63
6 files changed, 76 insertions, 77 deletions
diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp
index 844f0ac509..6842d3dc74 100644
--- a/indra/newview/llfloaterinventory.cpp
+++ b/indra/newview/llfloaterinventory.cpp
@@ -64,42 +64,6 @@ BOOL LLFloaterInventory::postBuild()
return TRUE;
}
-
-void LLFloaterInventory::draw()
-{
- updateTitle();
- LLFloater::draw();
-}
-
-void LLFloaterInventory::updateTitle()
-{
- 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]"] = mPanelMainInventory->getFilterText();
-
- if (LLInventoryModel::backgroundFetchActive())
- {
- setTitle(getString("TitleFetching", string_args));
- }
- else if (LLInventoryModel::isEverythingFetched())
- {
- setTitle(getString("TitleCompleted", string_args));
- }
- else
- {
- setTitle(getString("Title"));
- }
-}
-
-void LLFloaterInventory::changed(U32 mask)
-{
- updateTitle();
-}
-
LLInventoryPanel* LLFloaterInventory::getPanel()
{
if (mPanelMainInventory)
diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h
index b661c391a7..473d2b189d 100644
--- a/indra/newview/llfloaterinventory.h
+++ b/indra/newview/llfloaterinventory.h
@@ -63,13 +63,9 @@ public:
static void cleanup();
// Inherited functionality
- /*virtual*/ void changed(U32 mask);
- /*virtual*/ void draw();
/*virtual*/ void onOpen(const LLSD& key);
LLInventoryPanel* getPanel();
-protected:
- void updateTitle();
private:
LLPanelMainInventory* mPanelMainInventory;
};
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()
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index d9ea0da2da..b43e057f83 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -113,7 +113,8 @@ protected:
void setSortBy(const LLSD& userdata);
void saveTexture(const LLSD& userdata);
bool isSaveTextureEnabled(const LLSD& userdata);
-
+ void updateItemcountText();
+
private:
LLFloaterInventoryFinder* getFinder();
diff --git a/indra/newview/skins/default/xui/en/floater_inventory.xml b/indra/newview/skins/default/xui/en/floater_inventory.xml
index 0d381fe5cb..ba2e0d3277 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory.xml
@@ -14,22 +14,6 @@
single_instance="false"
title="MY INVENTORY"
width="467">
- <floater.string
- name="Title">
- MY INVENTORY
- </floater.string>
- <floater.string
- name="TitleFetching">
- MY INVENTORY (Fetching [ITEM_COUNT] Items...) [FILTER]
- </floater.string>
- <floater.string
- name="TitleCompleted">
- MY INVENTORY ([ITEM_COUNT] Items) [FILTER]
- </floater.string>
- <floater.string
- name="Fetched">
- Fetched
- </floater.string>
<panel
bottom="560"
class="panel_main_inventory"
diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
index 50983d2976..c7768c6eb6 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -10,9 +10,34 @@
name="main inventory panel"
width="330">
<panel.string
- name="Title">
- Things
+ name="Itemcount">
</panel.string>
+ <panel.string
+ name="ItemcountFetching">
+ Fetching [ITEM_COUNT] Items... [FILTER]
+ </panel.string>
+ <panel.string
+ name="ItemcountCompleted">
+ [ITEM_COUNT] Items [FILTER]
+ </panel.string>
+ <panel.string
+ name="ItemcountUnknown">
+
+ </panel.string>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="13"
+ layout="topleft"
+ left="12"
+ name="ItemcountText"
+ font="SansSerifMedium"
+ text_color="EmphasisColor"
+ top_pad="0"
+ width="300">
+ Items:
+ </text>
<menu_bar
bg_visible="false"
follows="left|top|right"
@@ -21,8 +46,8 @@
left="10"
mouse_opaque="false"
name="Inventory Menu"
- top="0"
- visible="true"
+ top="+10"
+ visible="true"
width="290">
<menu
height="101"
@@ -377,30 +402,30 @@
<filter_editor
text_pad_left="10"
follows="left|top|right"
- height="23"
+ height="23"
label="Filter Inventory"
layout="topleft"
left="10"
-max_length="300"
+ max_length="300"
name="inventory search editor"
- top="26"
+ top="+31"
width="303" />
<tab_container
- bg_opaque_color="DkGray2"
+ bg_opaque_color="DkGray2"
bg_alpha_color="DkGray2"
background_visible="true"
background_opaque="true"
-follows="all"
-halign="center"
- height="305"
- layout="topleft"
- left="6"
- name="inventory filter tabs"
- tab_height="30"
- tab_position="top"
- tab_min_width="100"
- top_pad="10"
- width="315">
+ follows="all"
+ halign="center"
+ height="300"
+ layout="topleft"
+ left="6"
+ name="inventory filter tabs"
+ tab_height="30"
+ tab_position="top"
+ tab_min_width="100"
+ top_pad="10"
+ width="315">
<inventory_panel
bg_opaque_color="DkGray2"
bg_alpha_color="DkGray2"