From 1fa3a6f1bd7c60c5e4226c0d84ee175e1ccb4476 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Thu, 22 May 2014 18:23:19 +0300 Subject: When creating a new user, create the folders "Current Outfit", "Favorites", and the standard subfolders of "Calling Cards". (If we don't create them now then they'll be created later by the viewer, but why wait.) --- .../Services/HypergridService/HGSuitcaseInventoryService.cs | 11 ++++------- OpenSim/Services/InventoryService/XInventoryService.cs | 12 ++++++++++-- 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs index 649e66c..d158537 100644 --- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs @@ -164,8 +164,6 @@ namespace OpenSim.Services.HypergridService m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to create suitcase folder"); return null; } - - m_Database.StoreFolder(suitcase); CreateSystemFolders(principalID, suitcase.folderID); } @@ -188,6 +186,10 @@ namespace OpenSim.Services.HypergridService CreateFolder(principalID, rootID, (int)AssetType.CallingCard, "Calling Cards"); if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Clothing) return true; return false; })) CreateFolder(principalID, rootID, (int)AssetType.Clothing, "Clothing"); + if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.CurrentOutfitFolder) return true; return false; })) + CreateFolder(principalID, rootID, (int)AssetType.CurrentOutfitFolder, "Current Outfit"); + if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.FavoriteFolder) return true; return false; })) + CreateFolder(principalID, rootID, (int)AssetType.FavoriteFolder, "Favorites"); if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Gesture) return true; return false; })) CreateFolder(principalID, rootID, (int)AssetType.Gesture, "Gestures"); if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Landmark) return true; return false; })) @@ -208,11 +210,6 @@ namespace OpenSim.Services.HypergridService CreateFolder(principalID, rootID, (int)AssetType.Texture, "Textures"); if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.TrashFolder) return true; return false; })) CreateFolder(principalID, rootID, (int)AssetType.TrashFolder, "Trash"); - if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.FavoriteFolder) return true; return false; })) - CreateFolder(principalID, rootID, (int)AssetType.FavoriteFolder, "Favorites"); - if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.CurrentOutfitFolder) return true; return false; })) - CreateFolder(principalID, rootID, (int)AssetType.CurrentOutfitFolder, "Current Outfit"); - } public override InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index 7c16ca9..362ff8f 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs @@ -122,10 +122,18 @@ namespace OpenSim.Services.InventoryService if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Bodypart) return true; return false; })) CreateFolder(principalID, rootFolder.ID, (int)AssetType.Bodypart, "Body Parts"); if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.CallingCard) return true; return false; })) - CreateFolder(principalID, rootFolder.ID, (int)AssetType.CallingCard, "Calling Cards"); + { + XInventoryFolder folder = CreateFolder(principalID, rootFolder.ID, (int)AssetType.CallingCard, "Calling Cards"); + folder = CreateFolder(principalID, folder.folderID, (int)AssetType.CallingCard, "Friends"); + CreateFolder(principalID, folder.folderID, (int)AssetType.CallingCard, "All"); + } if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Clothing) return true; return false; })) CreateFolder(principalID, rootFolder.ID, (int)AssetType.Clothing, "Clothing"); - if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Gesture) return true; return false; })) + if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.CurrentOutfitFolder) return true; return false; })) + CreateFolder(principalID, rootFolder.ID, (int)AssetType.CurrentOutfitFolder, "Current Outfit"); + if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.FavoriteFolder) return true; return false; })) + CreateFolder(principalID, rootFolder.ID, (int)AssetType.FavoriteFolder, "Favorites"); + if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Gesture) return true; return false; })) CreateFolder(principalID, rootFolder.ID, (int)AssetType.Gesture, "Gestures"); if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Landmark) return true; return false; })) CreateFolder(principalID, rootFolder.ID, (int)AssetType.Landmark, "Landmarks"); -- cgit v1.1