diff options
Diffstat (limited to 'linden/indra/newview')
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | linden/indra/newview/llinventoryview.cpp | 24 | ||||
-rw-r--r-- | linden/indra/newview/llinventoryview.h | 2 |
3 files changed, 36 insertions, 1 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index ff55c90..a33038b 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -15,6 +15,17 @@ | |||
15 | <key>Value</key> | 15 | <key>Value</key> |
16 | <integer>1</integer> | 16 | <integer>1</integer> |
17 | </map> | 17 | </map> |
18 | <key>InventoryPreviousCount</key> | ||
19 | <map> | ||
20 | <key>Comment</key> | ||
21 | <string>Previous total inventory loaded</string> | ||
22 | <key>Persist</key> | ||
23 | <integer>1</integer> | ||
24 | <key>Type</key> | ||
25 | <string>S32</string> | ||
26 | <key>Value</key> | ||
27 | <integer>-1</integer> | ||
28 | </map> | ||
18 | <key>ShowStatusBarInMouselook</key> | 29 | <key>ShowStatusBarInMouselook</key> |
19 | <map> | 30 | <map> |
20 | <key>Comment</key> | 31 | <key>Comment</key> |
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index 97df7a3..aee67b4 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp | |||
@@ -593,6 +593,9 @@ void LLInventoryView::init(LLInventoryModel* inventory) | |||
593 | 593 | ||
594 | } | 594 | } |
595 | 595 | ||
596 | //Initialize item count - rkeast | ||
597 | mItemCount = gSavedPerAccountSettings.getS32("InventoryPreviousCount"); | ||
598 | |||
596 | 599 | ||
597 | mSearchEditor = getChild<LLSearchEditor>("inventory search editor"); | 600 | mSearchEditor = getChild<LLSearchEditor>("inventory search editor"); |
598 | if (mSearchEditor) | 601 | if (mSearchEditor) |
@@ -848,7 +851,26 @@ void LLInventoryView::changed(U32 mask) | |||
848 | LLLocale locale(LLLocale::USER_LOCALE); | 851 | LLLocale locale(LLLocale::USER_LOCALE); |
849 | std::string item_count_string; | 852 | std::string item_count_string; |
850 | LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount()); | 853 | LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount()); |
851 | title << " (Fetched " << item_count_string << " items...)"; | 854 | |
855 | //Displays a progress indication for loading the inventory, but not if it hasn't been loaded before on this PC, or we load more than expected - rkeast | ||
856 | if(mItemCount == -1) | ||
857 | { | ||
858 | title << " (Fetched " << item_count_string << " items...)"; | ||
859 | } | ||
860 | else | ||
861 | { | ||
862 | S32 remaining = mItemCount - gInventory.getItemCount(); | ||
863 | std::string total_items; | ||
864 | std::string items_remaining; | ||
865 | LLResMgr::getInstance()->getIntegerString(total_items, mItemCount); | ||
866 | LLResMgr::getInstance()->getIntegerString(items_remaining, remaining); | ||
867 | if(remaining < 0) title << " (Fetched " << item_count_string << " items...)"; | ||
868 | else title << " (Fetched " << item_count_string << " items of ~" << total_items << " - ~" << items_remaining << " remaining...)"; | ||
869 | } | ||
870 | } | ||
871 | else | ||
872 | { | ||
873 | gSavedPerAccountSettings.setS32("InventoryPreviousCount", gInventory.getItemCount()); | ||
852 | } | 874 | } |
853 | title << mFilterText; | 875 | title << mFilterText; |
854 | setTitle(title.str()); | 876 | setTitle(title.str()); |
diff --git a/linden/indra/newview/llinventoryview.h b/linden/indra/newview/llinventoryview.h index 0c525c3..495a340 100644 --- a/linden/indra/newview/llinventoryview.h +++ b/linden/indra/newview/llinventoryview.h | |||
@@ -308,6 +308,8 @@ protected: | |||
308 | 308 | ||
309 | std::string mFilterText; | 309 | std::string mFilterText; |
310 | 310 | ||
311 | S32 mItemCount; | ||
312 | |||
311 | 313 | ||
312 | // This container is used to hold all active inventory views. This | 314 | // This container is used to hold all active inventory views. This |
313 | // is here to support the inventory toggle show button. | 315 | // is here to support the inventory toggle show button. |