summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 80336e5c5a..f434d15843 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -39,11 +39,15 @@
#include "indra_constants.h"
#include "llagent.h"
+#include "llagentcamera.h"
#include "llviewerfoldertype.h"
#include "llfolderview.h"
#include "llviewercontrol.h"
#include "llconsole.h"
+#include "llinventorydefines.h"
+#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
+#include "llinventorymodelbackgroundfetch.h"
#include "llgesturemgr.h"
#include "llsidetray.h"
@@ -101,7 +105,7 @@ public:
const std::string verb = params[1].asString();
if (verb == "select")
{
- std::vector<LLUUID> items_to_open;
+ uuid_vec_t items_to_open;
items_to_open.push_back(inventory_id);
//inventory_handler is just a stub, because we don't know from who this offer
open_inventory_offer(items_to_open, "inventory_handler");
@@ -512,7 +516,7 @@ void LLViewerInventoryCategory::removeFromServer( void )
gAgent.sendReliableMessage();
}
-bool LLViewerInventoryCategory::fetchDescendents()
+bool LLViewerInventoryCategory::fetch()
{
if((VERSION_UNKNOWN == mVersion)
&& mDescendentsRequested.hasExpired()) //Expired check prevents multiple downloads.
@@ -537,7 +541,7 @@ bool LLViewerInventoryCategory::fetchDescendents()
std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents");
if (!url.empty()) //Capability found. Build up LLSD and use it.
{
- gInventory.startBackgroundFetch(mUUID);
+ LLInventoryModelBackgroundFetch::instance().start(mUUID);
}
else
{ //Deprecated, but if we don't have a capability, use the old system.
@@ -790,8 +794,8 @@ void WearOnAvatarCallback::fire(const LLUUID& inv_item)
void ModifiedCOFCallback::fire(const LLUUID& inv_item)
{
- LLAppearanceManager::instance().updateAppearanceFromCOF();
- if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgent.getCameraMode() )
+ LLAppearanceMgr::instance().updateAppearanceFromCOF();
+ if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() )
{
// If we're in appearance editing mode, the current tab may need to be refreshed
if (gFloaterCustomize)
@@ -826,7 +830,7 @@ void ActivateGestureCallback::fire(const LLUUID& inv_item)
if (inv_item.isNull())
return;
- LLGestureManager::instance().activateGesture(inv_item);
+ LLGestureMgr::instance().activateGesture(inv_item);
}
void CreateGestureCallback::fire(const LLUUID& inv_item)
@@ -834,7 +838,7 @@ void CreateGestureCallback::fire(const LLUUID& inv_item)
if (inv_item.isNull())
return;
- LLGestureManager::instance().activateGesture(inv_item);
+ LLGestureMgr::instance().activateGesture(inv_item);
LLViewerInventoryItem* item = gInventory.getItem(inv_item);
if (!item) return;
@@ -919,6 +923,7 @@ void link_inventory_item(
const LLUUID& item_id,
const LLUUID& parent_id,
const std::string& new_name,
+ const std::string& new_description,
const LLAssetType::EType asset_type,
LLPointer<LLInventoryCallback> cb)
{
@@ -944,7 +949,6 @@ void link_inventory_item(
}
LLUUID transaction_id;
- std::string desc = "Broken link"; // This should only show if the object can't find its baseobj.
LLInventoryType::EType inv_type = LLInventoryType::IT_NONE;
if (dynamic_cast<const LLInventoryCategory *>(baseobj))
{
@@ -975,7 +979,7 @@ void link_inventory_item(
msg->addS8Fast(_PREHASH_Type, (S8)asset_type);
msg->addS8Fast(_PREHASH_InvType, (S8)inv_type);
msg->addStringFast(_PREHASH_Name, new_name);
- msg->addStringFast(_PREHASH_Description, desc);
+ msg->addStringFast(_PREHASH_Description, new_description);
}
gAgent.sendReliableMessage();
}
@@ -1071,7 +1075,7 @@ const std::string NEW_NOTECARD_NAME = "New Note"; // *TODO:Translate? (probably
const std::string NEW_GESTURE_NAME = "New Gesture"; // *TODO:Translate? (probably not)
// ! REFACTOR ! Really need to refactor this so that it's not a bunch of if-then statements...
-void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, const LLSD& userdata, const LLUUID& default_parent_uuid)
+void menu_create_inventory_item(LLFolderView* root, LLFolderBridge *bridge, const LLSD& userdata, const LLUUID& default_parent_uuid)
{
std::string type_name = userdata.asString();
@@ -1095,7 +1099,7 @@ void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, co
LLUUID category = gInventory.createNewCategory(parent_id, preferred_type, LLStringUtil::null);
gInventory.notifyObservers();
- folder->setSelectionByID(category, TRUE);
+ root->setSelectionByID(category, TRUE);
}
else if ("lsl" == type_name)
{
@@ -1140,7 +1144,7 @@ void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, co
llwarns << "Can't create unrecognized type " << type_name << llendl;
}
}
- folder->setNeedsAutoRename(TRUE);
+ root->setNeedsAutoRename(TRUE);
}
LLAssetType::EType LLViewerInventoryItem::getType() const
@@ -1475,7 +1479,7 @@ EWearableType LLViewerInventoryItem::getWearableType() const
llwarns << "item is not a wearable" << llendl;
return WT_INVALID;
}
- return EWearableType(getFlags() & LLInventoryItem::II_FLAGS_WEARABLES_MASK);
+ return EWearableType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK);
}