EXT-2482 : Newly created folders have wrong default type
Removed AT_ROOT_CATEGORY and FT_ROOT_CATEGORY since those types are unused. Changed FT_CATEGORY to FT_ROOT_INVENTORY to make its purpose more clear. This change assumes that no agent inventories have category type 9 for either inventory type or folder preferred type. --HG-- branch : avatar-pipelinemaster
parent
0fb0ce836d
commit
f0cd44a6a2
|
|
@ -78,11 +78,6 @@ public:
|
|||
// Holds a collection of inventory items.
|
||||
// It's treated as an item in the inventory and therefore needs a type.
|
||||
|
||||
AT_ROOT_CATEGORY = 9,
|
||||
// A user's root inventory category.
|
||||
// We decided to expose it visually, so it seems logical to fold
|
||||
// it into the asset types.
|
||||
|
||||
AT_LSL_TEXT = 10,
|
||||
AT_LSL_BYTECODE = 11,
|
||||
// The LSL is the scripting language.
|
||||
|
|
|
|||
|
|
@ -72,8 +72,7 @@ LLFolderDictionary::LLFolderDictionary()
|
|||
addEntry(LLFolderType::FT_CLOTHING, new FolderEntry("clothing", TRUE));
|
||||
addEntry(LLFolderType::FT_OBJECT, new FolderEntry("object", TRUE));
|
||||
addEntry(LLFolderType::FT_NOTECARD, new FolderEntry("notecard", TRUE));
|
||||
addEntry(LLFolderType::FT_CATEGORY, new FolderEntry("category", TRUE));
|
||||
addEntry(LLFolderType::FT_ROOT_CATEGORY, new FolderEntry("root", TRUE));
|
||||
addEntry(LLFolderType::FT_ROOT_INVENTORY, new FolderEntry("root_inv", TRUE));
|
||||
addEntry(LLFolderType::FT_LSL_TEXT, new FolderEntry("lsltext", TRUE));
|
||||
addEntry(LLFolderType::FT_BODYPART, new FolderEntry("bodypart", TRUE));
|
||||
addEntry(LLFolderType::FT_TRASH, new FolderEntry("trash", TRUE));
|
||||
|
|
|
|||
|
|
@ -52,23 +52,18 @@ public:
|
|||
|
||||
FT_LANDMARK = 3,
|
||||
|
||||
// FT_SCRIPT = 4,
|
||||
|
||||
FT_CLOTHING = 5,
|
||||
|
||||
FT_OBJECT = 6,
|
||||
|
||||
FT_NOTECARD = 7,
|
||||
|
||||
FT_CATEGORY = 8,
|
||||
|
||||
FT_ROOT_CATEGORY = 9,
|
||||
FT_ROOT_INVENTORY = 8,
|
||||
// We'd really like to change this to 9 since AT_CATEGORY is 8,
|
||||
// but "My Inventory" has been type 8 for a long time.
|
||||
|
||||
FT_LSL_TEXT = 10,
|
||||
|
||||
// FT_LSL_BYTECODE = 11,
|
||||
// FT_TEXTURE_TGA = 12,
|
||||
|
||||
FT_BODYPART = 13,
|
||||
|
||||
FT_TRASH = 14,
|
||||
|
|
@ -77,16 +72,10 @@ public:
|
|||
|
||||
FT_LOST_AND_FOUND = 16,
|
||||
|
||||
// FT_SOUND_WAV = 17,
|
||||
// FT_IMAGE_TGA = 18,
|
||||
// FT_IMAGE_JPEG = 19,
|
||||
|
||||
FT_ANIMATION = 20,
|
||||
|
||||
FT_GESTURE = 21,
|
||||
|
||||
// FT_SIMSTATE = 22,
|
||||
|
||||
FT_FAVORITE = 23,
|
||||
|
||||
FT_ENSEMBLE_START = 26,
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] =
|
|||
LLInventoryType::IT_OBJECT, // AT_OBJECT
|
||||
LLInventoryType::IT_NOTECARD, // AT_NOTECARD
|
||||
LLInventoryType::IT_CATEGORY, // AT_CATEGORY
|
||||
LLInventoryType::IT_ROOT_CATEGORY, // AT_ROOT_CATEGORY
|
||||
LLInventoryType::IT_NONE, // (null entry)
|
||||
LLInventoryType::IT_LSL, // AT_LSL_TEXT
|
||||
LLInventoryType::IT_LSL, // AT_LSL_BYTECODE
|
||||
LLInventoryType::IT_TEXTURE, // AT_TEXTURE_TGA
|
||||
|
|
|
|||
|
|
@ -230,10 +230,6 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
|
|||
if (obj->getType() == LLAssetType::AT_CATEGORY)
|
||||
continue;
|
||||
|
||||
// Skip root folders, so we know we have inventory items only
|
||||
if (obj->getType() == LLAssetType::AT_ROOT_CATEGORY)
|
||||
continue;
|
||||
|
||||
// Skip the mysterious blank InventoryObject
|
||||
if (obj->getType() == LLAssetType::AT_NONE)
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -187,10 +187,6 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
|
|||
if (asset_type == LLAssetType::AT_CATEGORY)
|
||||
continue;
|
||||
|
||||
// Skip root folders, so we know we have inventory items only
|
||||
if (asset_type == LLAssetType::AT_ROOT_CATEGORY)
|
||||
continue;
|
||||
|
||||
LLInventoryItem* inv_item = (LLInventoryItem*)((LLInventoryObject*)(*it));
|
||||
inv_type = inv_item->getInventoryType();
|
||||
|
||||
|
|
@ -286,7 +282,7 @@ void LLFloaterBuyContents::onClickBuy()
|
|||
|
||||
// Put the items where we put new folders.
|
||||
LLUUID category_id;
|
||||
category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CATEGORY);
|
||||
category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_ROOT_INVENTORY);
|
||||
|
||||
// *NOTE: doesn't work for multiple object buy, which UI does not
|
||||
// currently support sale info is used for verification only, if
|
||||
|
|
|
|||
|
|
@ -892,7 +892,6 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
|
|||
new_listener = new LLWearableBridge(inventory, uuid, asset_type, inv_type, (EWearableType)flags);
|
||||
break;
|
||||
case LLAssetType::AT_CATEGORY:
|
||||
case LLAssetType::AT_ROOT_CATEGORY:
|
||||
if (actual_asset_type == LLAssetType::AT_LINK_FOLDER)
|
||||
{
|
||||
// Create a link folder handler instead.
|
||||
|
|
@ -2847,10 +2846,6 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
|||
BOOL is_movable = TRUE;
|
||||
switch( inv_item->getActualType() )
|
||||
{
|
||||
case LLAssetType::AT_ROOT_CATEGORY:
|
||||
is_movable = FALSE;
|
||||
break;
|
||||
|
||||
case LLAssetType::AT_CATEGORY:
|
||||
is_movable = !LLFolderType::lookupIsProtectedType(((LLInventoryCategory*)inv_item)->getPreferredType());
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType t, bo
|
|||
const LLUUID &LLInventoryModel::findCatUUID(LLFolderType::EType preferred_type) const
|
||||
{
|
||||
const LLUUID &root_id = gInventory.getRootFolderID();
|
||||
if(LLFolderType::FT_CATEGORY == preferred_type)
|
||||
if(LLFolderType::FT_ROOT_INVENTORY == preferred_type)
|
||||
{
|
||||
return root_id;
|
||||
}
|
||||
|
|
@ -2465,7 +2465,7 @@ void LLInventoryModel::buildParentChildMap()
|
|||
{
|
||||
cat->setParent(findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND));
|
||||
}
|
||||
else if(LLFolderType::FT_CATEGORY == pref)
|
||||
else if(LLFolderType::FT_ROOT_INVENTORY == pref)
|
||||
{
|
||||
// it's the root
|
||||
cat->setParent(LLUUID::null);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ LLViewerAssetDictionary::LLViewerAssetDictionary()
|
|||
addEntry(LLViewerAssetType::AT_OBJECT, new ViewerAssetEntry(DAD_OBJECT));
|
||||
addEntry(LLViewerAssetType::AT_NOTECARD, new ViewerAssetEntry(DAD_NOTECARD));
|
||||
addEntry(LLViewerAssetType::AT_CATEGORY, new ViewerAssetEntry(DAD_CATEGORY));
|
||||
addEntry(LLViewerAssetType::AT_ROOT_CATEGORY, new ViewerAssetEntry(DAD_ROOT_CATEGORY));
|
||||
addEntry(LLViewerAssetType::AT_LSL_TEXT, new ViewerAssetEntry(DAD_SCRIPT));
|
||||
addEntry(LLViewerAssetType::AT_LSL_BYTECODE, new ViewerAssetEntry(DAD_NONE));
|
||||
addEntry(LLViewerAssetType::AT_TEXTURE_TGA, new ViewerAssetEntry(DAD_NONE));
|
||||
|
|
|
|||
|
|
@ -109,8 +109,7 @@ LLViewerFolderDictionary::LLViewerFolderDictionary()
|
|||
addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "inv_folder_clothing.tga"));
|
||||
addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "inv_folder_object.tga"));
|
||||
addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "inv_folder_notecard.tga"));
|
||||
addEntry(LLFolderType::FT_CATEGORY, new ViewerFolderEntry("New Folder", "inv_folder_plain_closed.tga"));
|
||||
addEntry(LLFolderType::FT_ROOT_CATEGORY, new ViewerFolderEntry("Inventory", ""));
|
||||
addEntry(LLFolderType::FT_ROOT_INVENTORY, new ViewerFolderEntry("My Inventory", ""));
|
||||
addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "inv_folder_script.tga"));
|
||||
addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "inv_folder_bodypart.tga"));
|
||||
addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "inv_folder_trash.tga"));
|
||||
|
|
|
|||
|
|
@ -3879,8 +3879,7 @@ void god_force_inv_owner_permissive(LLViewerObject* object,
|
|||
InventoryObjectList::const_iterator inv_end = inventory->end();
|
||||
for ( ; inv_it != inv_end; ++inv_it)
|
||||
{
|
||||
if(((*inv_it)->getType() != LLAssetType::AT_CATEGORY)
|
||||
&& ((*inv_it)->getType() != LLAssetType::AT_ROOT_CATEGORY))
|
||||
if(((*inv_it)->getType() != LLAssetType::AT_CATEGORY))
|
||||
{
|
||||
LLInventoryObject* obj = *inv_it;
|
||||
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem((LLViewerInventoryItem*)obj);
|
||||
|
|
|
|||
|
|
@ -4833,8 +4833,7 @@ void container_inventory_arrived(LLViewerObject* object,
|
|||
InventoryObjectList::const_iterator end = inventory->end();
|
||||
for ( ; it != end; ++it)
|
||||
{
|
||||
if ((*it)->getType() != LLAssetType::AT_CATEGORY &&
|
||||
(*it)->getType() != LLAssetType::AT_ROOT_CATEGORY)
|
||||
if ((*it)->getType() != LLAssetType::AT_CATEGORY)
|
||||
{
|
||||
LLInventoryObject* obj = (LLInventoryObject*)(*it);
|
||||
LLInventoryItem* item = (LLInventoryItem*)(obj);
|
||||
|
|
@ -4869,8 +4868,7 @@ void container_inventory_arrived(LLViewerObject* object,
|
|||
// one actual object
|
||||
InventoryObjectList::iterator it = inventory->begin();
|
||||
|
||||
if ((*it)->getType() == LLAssetType::AT_CATEGORY ||
|
||||
(*it)->getType() == LLAssetType::AT_ROOT_CATEGORY)
|
||||
if ((*it)->getType() == LLAssetType::AT_CATEGORY)
|
||||
{
|
||||
++it;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue