summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-09-12 19:51:13 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-09-12 19:51:13 +0300
commitb5c745185f4e3d2d215b5a171dc96a57d01eb079 (patch)
treeb63e848a605ca00ae7caa376d07ac3d8ef3ae341 /indra
parentf107d8431ccbd85bbe6f2ac0fd47cd409b8c0cfc (diff)
SL-20162 Option for debuging folder version in UI
Shows folder's data instead of a suffix. Will need either a new inventory window or to toggle UI debug on early.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorybridge.cpp21
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml1
2 files changed, 21 insertions, 1 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 49b6275c3e..481b221870 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2321,13 +2321,32 @@ void LLFolderBridge::buildDisplayName() const
std::string LLFolderBridge::getLabelSuffix() const
{
static LLCachedControl<F32> folder_loading_message_delay(gSavedSettings, "FolderLoadingMessageWaitTime", 0.5f);
+ static LLCachedControl<bool> xui_debug(gSavedSettings, "DebugShowXUINames", 0);
if (mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= folder_loading_message_delay())
{
return llformat(" ( %s ) ", LLTrans::getString("LoadingData").c_str());
}
std::string suffix = "";
- if(mShowDescendantsCount)
+ if (xui_debug)
+ {
+ LLInventoryModel::cat_array_t* cats;
+ LLInventoryModel::item_array_t* items;
+ gInventory.getDirectDescendentsOf(getUUID(), cats, items);
+
+ LLViewerInventoryCategory* cat = gInventory.getCategory(getUUID());
+ if (cat)
+ {
+ LLStringUtil::format_map_t args;
+ args["[FOLDER_COUNT]"] = llformat("%d", cats->size());
+ args["[ITEMS_COUNT]"] = llformat("%d", items->size());
+ args["[VERSION]"] = llformat("%d", cat->getVersion());
+ args["[VIEWER_DESCENDANT_COUNT]"] = llformat("%d", cats->size() + items->size());
+ args["[SERVER_DESCENDANT_COUNT]"] = llformat("%d", cat->getDescendentCount());
+ suffix = " " + LLTrans::getString("InventoryFolderDebug", args);
+ }
+ }
+ else if(mShowDescendantsCount)
{
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 4cdc8f2835..04b374cb00 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2355,6 +2355,7 @@ If you continue to receive this message, please contact Second Life support for
<string name="InventoryMarketplaceListingsNoItems">
Drag folders to this area to list them for sale on the [[MARKETPLACE_DASHBOARD_URL] Marketplace].
</string>
+ <string name="InventoryFolderDebug">( F:[FOLDER_COUNT] I:[ITEMS_COUNT] V:[VERSION] DC:[VIEWER_DESCENDANT_COUNT]/[SERVER_DESCENDANT_COUNT] )</string>
<string name="InventoryItemsCount">( [ITEMS_COUNT] Items )</string>
<string name="Marketplace Validation Log"></string>
<string name="Marketplace Validation Warning Stock">stock folder must be contained by a version folder</string>