LIBOMV-359 Reverting InventoryManager/Inventory system to old inventory system based on r2020, Disabled GUI library in prebuild.xml as its based on the new inventory system and needs to be rewritten to be used with the old inventorymanager (or re-enabled when new inventory system is added back to trunk

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2126 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
Jim Radford
2008-08-21 01:19:06 +00:00
parent cfb75b85b0
commit c551283fd8
30 changed files with 2062 additions and 3700 deletions

View File

@@ -14,7 +14,7 @@ namespace OpenMetaverse.TestClient
/// </summary>
public class DeleteFolderCommand : Command
{
public DeleteFolderCommand(TestClient testClient)
public DeleteFolderCommand(TestClient testClient)
{
Name = "deleteFolder";
Description = "Moves a folder to the Trash Folder";
@@ -27,27 +27,19 @@ namespace OpenMetaverse.TestClient
string target = String.Empty;
for (int ct = 0; ct < args.Length; ct++)
target = target + args[ct] + " ";
target = target.TrimEnd();
// initialize results list
List<InventoryBase> found = new List<InventoryBase>();
try
{
// find the folder
found = Client.InventoryStore.InventoryFromPath(target, Client.CurrentDirectory, true);
if (found.Count > 0)
found = Client.Inventory.LocalFind(Client.Inventory.Store.RootFolder.UUID, target.Split('/'), 0, true);
if (found.Count.Equals(1))
{
InventoryBase item = found[0];
InventoryFolder trash = Client.InventoryStore[Client.Inventory.FindFolderForType(AssetType.TrashFolder)] as InventoryFolder;
if (trash != null)
{
item.Move(trash);
return String.Format("Moved folder {0} ({1}) to Trash", item.Name, item.UUID);
}
}
else
{
return String.Format("Unable to locate {0}", target);
// move the folder to the trash folder
Client.Inventory.MoveFolder(found[0].UUID, Client.Inventory.FindFolderForType(AssetType.TrashFolder));
return String.Format("Moved folder {0} to Trash", found[0].Name);
}
}
catch (InvalidOutfitException ex)
@@ -55,6 +47,6 @@ namespace OpenMetaverse.TestClient
return "Folder Not Found: (" + ex.Message + ")";
}
return string.Empty;
}
}
}
}
}
}