summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-06-30 16:25:19 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-06-30 16:25:19 -0700
commit6c12a5ca550e06730e06d1a909fbf43d7bda16f5 (patch)
tree0ba352ce5243ed5f5792cd0485250e2c2925c44d /indra/newview/llinventorypanel.cpp
parent9847f5674cb5528612be1448f8dd25abfb362045 (diff)
EXP-919 FIX -- Items not shown in Received Items panel
EXP-929 FIX -- First Direct Delivery item purchased while logged in: Received Items folder visible in inventory and item not visible in Received items panel - no badge count update * Inbox and Outbox inventory panels now live in their own XML files and are hot loaded into place when appropriate, like when the "Received Items" folder is first created, for example. * The Inbox and Outbox panels now show relevant default messages when the folders are empty or do not exist * Added LLInventoryCategoryAddedObserver, a new inventory observer type to observe added folders * Hacked LLInventoryPanel to properly set up inbox and outbox inventory views for the "Received Items" folder and the "Merchant Outbox" folder that aren't created with the proper system folder type * Changed inventory badge count computation to use LLFolderView rather than the inventory directly * Applied various focus, selection and other inbox fixes to the outbox Reviewed by Richard.
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 834da49c61..864e6a181e 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -161,6 +161,49 @@ void LLInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params)
{
root_id = gInventory.getLibraryRootFolderID();
}
+ // leslie -- temporary HACK to work around sim not creating inbox and outbox with proper system folder type
+ else if (preferred_type == LLFolderType::FT_INBOX)
+ {
+ LLInventoryModel::cat_array_t* cats;
+ LLInventoryModel::item_array_t* items;
+
+ gInventory.getDirectDescendentsOf(gInventory.getRootFolderID(), cats, items);
+
+ if (cats)
+ {
+ for (LLInventoryModel::cat_array_t::const_iterator cat_it = cats->begin(); cat_it != cats->end(); ++cat_it)
+ {
+ LLInventoryCategory* cat = *cat_it;
+
+ if (cat->getName() == "Received Items")
+ {
+ root_id = cat->getUUID();
+ }
+ }
+ }
+ }
+ // leslie -- temporary HACK to work around sim not creating inbox and outbox with proper system folder type
+ else if (preferred_type == LLFolderType::FT_OUTBOX)
+ {
+ LLInventoryModel::cat_array_t* cats;
+ LLInventoryModel::item_array_t* items;
+
+ gInventory.getDirectDescendentsOf(gInventory.getRootFolderID(), cats, items);
+
+ if (cats)
+ {
+ for (LLInventoryModel::cat_array_t::const_iterator cat_it = cats->begin(); cat_it != cats->end(); ++cat_it)
+ {
+ LLInventoryCategory* cat = *cat_it;
+
+ if (cat->getName() == "Merchant Outbox")
+ {
+ root_id = cat->getUUID();
+ }
+ }
+ }
+ }
+ // leslie -- end temporary HACK
else
{
root_id = (preferred_type != LLFolderType::FT_NONE)