From 14724102f352ec9f79506db173ee952ef5412cf8 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 14 Jul 2010 16:25:17 +0300 Subject: EXT-8319 FIXED Added method to localize inventory categories having predefined names, updated predefined keys for "Male - Get lost" and "Female - Get lost". There were two issues: * "Male - Get lost" and "Female - Get lost" gestures have by 2 spaces before "-" in their names. * Folders were not processed to be localize. This was not implemented correctly in EXT-7051. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/753/ --HG-- branch : product-engine --- indra/newview/llinventorymodel.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 236ed9bbd1..13e5cb516e 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1254,6 +1254,9 @@ void LLInventoryModel::addCategory(LLViewerInventoryCategory* category) //llinfos << "LLInventoryModel::addCategory()" << llendl; if(category) { + // try to localize default names first. See EXT-8319, EXT-7051. + category->localizeName(); + // Insert category uniquely into the map mCategoryMap[category->getUUID()] = category; // LLPointer will deref and delete the old one //mInventory[category->getUUID()] = category; -- cgit v1.2.3 From ca1224fd7968edebfcd274c21439ca74340efc26 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 20 Jul 2010 10:44:27 -0400 Subject: EXT-8360 FIX - item name changes get propagated to the various appearance panel widgets --- indra/newview/llinventorymodel.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 13e5cb516e..5a952bb6a8 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -294,6 +294,30 @@ void LLInventoryModel::getDirectDescendentsOf(const LLUUID& cat_id, items = get_ptr_in_map(mParentChildItemTree, cat_id); } +LLMD5 LLInventoryModel::hashDirectDescendentNames(const LLUUID& cat_id) const +{ + LLInventoryModel::cat_array_t* cat_array; + LLInventoryModel::item_array_t* item_array; + getDirectDescendentsOf(cat_id,cat_array,item_array); + LLMD5 item_name_hash; + if (!item_array) + { + item_name_hash.finalize(); + return item_name_hash; + } + for (LLInventoryModel::item_array_t::const_iterator iter = item_array->begin(); + iter != item_array->end(); + iter++) + { + const LLViewerInventoryItem *item = (*iter); + if (!item) + continue; + item_name_hash.update(item->getName()); + } + item_name_hash.finalize(); + return item_name_hash; +} + // SJB: Added version to lock the arrays to catch potential logic bugs void LLInventoryModel::lockDirectDescendentArrays(const LLUUID& cat_id, cat_array_t*& categories, -- cgit v1.2.3