summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-08-23 22:40:17 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-08-23 22:40:17 +0300
commit3d73a10da3e051b232b4ddc89c1463a8b097ca7f (patch)
tree8b32d955d0628ca1138301177e1413cc419229fd /indra/newview/llinventoryfunctions.cpp
parent4b5b048cb6280cbd9fd303acd96fce73461d1fb4 (diff)
parentd454512050e636a19e4b7545515dea4f4b1bbf0d (diff)
Merge branch main (DRTVWR-582) into DRTVWR-567
# Conflicts: # indra/newview/app_settings/settings.xml # indra/newview/llinventoryfunctions.cpp # indra/newview/llinventoryfunctions.h # indra/newview/llinventorymodel.cpp # indra/newview/llinventoryobserver.cpp # indra/newview/llinventoryobserver.h # indra/newview/skins/default/xui/ja/floater_inventory_item_properties.xml
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp34
1 files changed, 32 insertions, 2 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index f813639073..f5f0d74f0f 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -217,8 +217,7 @@ bool contains_nocopy_items(const LLUUID& id)
return false;
}
-// Generates a string containing the path to the item specified by
-// item_id.
+// Generates a string containing the path to the item specified by id.
void append_path(const LLUUID& id, std::string& path)
{
std::string temp;
@@ -238,6 +237,36 @@ void append_path(const LLUUID& id, std::string& path)
path.append(temp);
}
+// Generates a string containing the path name of the object.
+std::string make_path(const LLInventoryObject* object)
+{
+ std::string path;
+ append_path(object->getUUID(), path);
+ return path + "/" + object->getName();
+}
+
+// Generates a string containing the path name of the object specified by id.
+std::string make_inventory_path(const LLUUID& id)
+{
+ if (LLInventoryObject* object = gInventory.getObject(id))
+ return make_path(object);
+ return "";
+}
+
+// Generates a string containing the path name and id of the object.
+std::string make_info(const LLInventoryObject* object)
+{
+ return "'" + make_path(object) + "' (" + object->getUUID().asString() + ")";
+}
+
+// Generates a string containing the path name and id of the object specified by id.
+std::string make_inventory_info(const LLUUID& id)
+{
+ if (LLInventoryObject* object = gInventory.getObject(id))
+ return make_info(object);
+ return "<Inventory object not found!> (" + id.asString() + ")";
+}
+
void update_marketplace_folder_hierarchy(const LLUUID cat_id)
{
// When changing the marketplace status of a folder, the only thing that needs to happen is
@@ -1570,6 +1599,7 @@ bool move_folder_to_marketplacelistings(LLInventoryCategory* inv_cat, const LLUU
}
else
{
+ LL_INFOS("SLM") << "Move category " << make_info(viewer_inv_cat) << " to '" << make_inventory_path(dest_folder) << "'" << LL_ENDL;
// Reparent the folder
gInventory.changeCategoryParent(viewer_inv_cat, dest_folder, false);
// Check the destination folder recursively for no copy items and promote the including folders if any