From 6c12a5ca550e06730e06d1a909fbf43d7bda16f5 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Thu, 30 Jun 2011 16:25:19 -0700 Subject: 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. --- indra/newview/llinventoryobserver.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'indra/newview/llinventoryobserver.cpp') diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 6bf19e346d..ceba4a0191 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -601,6 +601,34 @@ void LLInventoryAddedObserver::changed(U32 mask) } } +void LLInventoryCategoryAddedObserver::changed(U32 mask) +{ + if (!(mask & LLInventoryObserver::ADD)) + { + return; + } + + const LLInventoryModel::changed_items_t& changed_ids = gInventory.getChangedIDs(); + + for (LLInventoryModel::changed_items_t::const_iterator cit = changed_ids.begin(); cit != changed_ids.end(); ++cit) + { + LLViewerInventoryCategory* cat = gInventory.getCategory(*cit); + + if (cat) + { + mAddedCategories.push_back(cat); + } + } + + if (!mAddedCategories.empty()) + { + done(); + + mAddedCategories.clear(); + } +} + + LLInventoryTransactionObserver::LLInventoryTransactionObserver(const LLTransactionID& transaction_id) : mTransactionID(transaction_id) { -- cgit v1.2.3