summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llappearancemgr.cpp7
-rw-r--r--indra/newview/llfloateropenobject.cpp2
-rw-r--r--indra/newview/llinventoryfunctions.cpp1
-rw-r--r--indra/newview/llinventorymodel.cpp37
4 files changed, 45 insertions, 2 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 4fc09c7739..d05c30d722 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1702,6 +1702,7 @@ void LLAppearanceMgr::shallowCopyCategory(const LLUUID& src_id, const LLUUID& ds
parent_id = gInventory.getRootFolderID();
}
// USES UDP PATH
+ // D567 needs to carry over thumbnail info
LLUUID subfolder_id = gInventory.createNewCategory( parent_id,
LLFolderType::FT_NONE,
src_cat->getName());
@@ -2728,6 +2729,7 @@ void LLAppearanceMgr::wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool ap
}
// UDP PATH
+ // D567 needs to carry over thumbnail info if present
LLUUID new_cat_id = gInventory.createNewCategory(
pid,
LLFolderType::FT_NONE,
@@ -3983,6 +3985,7 @@ void LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, boo
// First, make a folder in the My Outfits directory.
const LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
+ // D567 replace with coros
if (AISAPI::isAvailable())
{
// cap-based category creation was buggy until recently. use
@@ -3990,6 +3993,7 @@ void LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, boo
// not actually use AIS to create the category.
inventory_func_type func = boost::bind(&LLAppearanceMgr::onOutfitFolderCreated,this,_1,show_panel);
+ // D567 copy thumbnail info from source folder
LLUUID folder_id = gInventory.createNewCategory(
parent_id,
LLFolderType::FT_OUTFIT,
@@ -3998,7 +4002,8 @@ void LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, boo
}
else
{
- // UDP PATH
+ // UDP PATH, should remove
+ // D567 copy thumbnail info from source folder
LLUUID folder_id = gInventory.createNewCategory(
parent_id,
LLFolderType::FT_OUTFIT,
diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp
index 2a1749bd42..cff42f72b7 100644
--- a/indra/newview/llfloateropenobject.cpp
+++ b/indra/newview/llfloateropenobject.cpp
@@ -166,6 +166,7 @@ void LLFloaterOpenObject::moveToInventory(bool wear, bool replace)
}
inventory_func_type func = boost::bind(LLFloaterOpenObject::callbackCreateInventoryCategory,_1,object_id,wear,replace);
+ // D567 copy thumbnail info
LLUUID category_id = gInventory.createNewCategory(parent_category_id,
LLFolderType::FT_NONE,
name,
@@ -173,6 +174,7 @@ void LLFloaterOpenObject::moveToInventory(bool wear, bool replace)
//If we get a null category ID, we are using a capability in createNewCategory and we will
//handle the following in the callbackCreateInventoryCategory routine.
+ // D567 review
if ( category_id.notNull() )
{
LLCatAndWear* data = new LLCatAndWear;
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 27edc8148e..145cdf6476 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -403,6 +403,7 @@ void copy_inventory_category(LLInventoryModel* model,
bool move_no_copy_items )
{
// Create the initial folder
+ // D567 needs to handle new fields
inventory_func_type func = boost::bind(&copy_inventory_category_content, _1, model, cat, root_copy_id, move_no_copy_items);
gInventory.createNewCategory(parent_id, LLFolderType::FT_NONE, cat->getName(), func);
}
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index a7b3076e52..b64dd431db 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -700,8 +700,13 @@ LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id,
name.assign(LLViewerFolderType::lookupNewCategoryName(preferred_type));
}
+#ifdef USE_AIS_FOR_NC
+ // D567 currently this doesn't really work due to limitations in
+ // AIS3, also violates the common caller assumption that we can
+ // assign the id and return immediately.
if (callback)
{
+ // D567 note that we no longer assign the UUID in the viewer, so various workflows need to change.
LLSD new_inventory = LLSD::emptyMap();
new_inventory["categories"] = LLSD::emptyArray();
LLViewerInventoryCategory cat(LLUUID::null, parent_id, preferred_type, name, gAgent.getID());
@@ -711,17 +716,47 @@ LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id,
return LLUUID::null;
}
+#else
+ LLViewerRegion* viewer_region = gAgent.getRegion();
+ std::string url;
+ if ( viewer_region )
+ url = viewer_region->getCapability("CreateInventoryCategory");
+
+ if (!url.empty() && callback)
+ {
+ //Let's use the new capability.
+
+ id.generate();
+ LLSD request, body;
+ body["folder_id"] = id;
+ body["parent_id"] = parent_id;
+ body["type"] = (LLSD::Integer) preferred_type;
+ body["name"] = name;
+
+ request["message"] = "CreateInventoryCategory";
+ request["payload"] = body;
+
+ LL_DEBUGS(LOG_INV) << "Creating category via request: " << ll_pretty_print_sd(request) << LL_ENDL;
+ LLCoros::instance().launch("LLInventoryModel::createNewCategoryCoro",
+ boost::bind(&LLInventoryModel::createNewCategoryCoro, this, url, body, callback));
+
+ return LLUUID::null;
+ }
+#endif
+
if (!gMessageSystem)
{
return LLUUID::null;
}
- // FIXME this UDP code path needs to be removed. Requires
+ // D567 FIXME this UDP code path needs to be removed. Requires
// reworking many of the callers to use callbacks rather than
// assuming instant success.
// Add the category to the internal representation
+ LL_WARNS() << "D567 need to remove this usage" << LL_ENDL;
+
id.generate();
LLPointer<LLViewerInventoryCategory> cat =
new LLViewerInventoryCategory(id, parent_id, preferred_type, name, gAgent.getID());