summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelobjectinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelobjectinventory.cpp')
-rw-r--r--indra/newview/llpanelobjectinventory.cpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index c43cbf5819..3a82cf6f8b 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -46,10 +46,12 @@
#include "roles_constants.h"
#include "llagent.h"
+#include "llavataractions.h"
#include "llcallbacklist.h"
#include "llfloaterbuycurrency.h"
#include "llfloaterreg.h"
#include "llinventorybridge.h"
+#include "llinventorydefines.h"
#include "llinventoryfilter.h"
#include "llinventoryfunctions.h"
#include "llpreviewanim.h"
@@ -128,7 +130,7 @@ public:
virtual void pasteFromClipboard();
virtual void pasteLinkFromClipboard();
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
- virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action);
+ virtual void performAction(LLInventoryModel* model, std::string action);
virtual BOOL isUpToDate() const { return TRUE; }
virtual BOOL hasChildren() const { return FALSE; }
virtual LLInventoryType::EType getInventoryType() const { return LLInventoryType::IT_NONE; }
@@ -344,7 +346,7 @@ time_t LLTaskInvFVBridge::getCreationDate() const
LLUIImagePtr LLTaskInvFVBridge::getIcon() const
{
BOOL item_is_multi = FALSE;
- if ( mFlags & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
+ if ( mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
{
item_is_multi = TRUE;
}
@@ -595,7 +597,7 @@ BOOL LLTaskInvFVBridge::dragOrDrop(MASK mask, BOOL drop,
}
// virtual
-void LLTaskInvFVBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
+void LLTaskInvFVBridge::performAction(LLInventoryModel* model, std::string action)
{
if (action == "task_buy")
{
@@ -917,7 +919,7 @@ public:
virtual LLUIImagePtr getIcon() const;
virtual void openItem();
- virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action);
+ virtual void performAction(LLInventoryModel* model, std::string action);
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
static void openSoundPreview(void* data);
};
@@ -954,7 +956,7 @@ void LLTaskSoundBridge::openSoundPreview(void* data)
}
// virtual
-void LLTaskSoundBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
+void LLTaskSoundBridge::performAction(LLInventoryModel* model, std::string action)
{
if (action == "task_play")
{
@@ -964,7 +966,7 @@ void LLTaskSoundBridge::performAction(LLFolderView* folder, LLInventoryModel* mo
send_sound_trigger(item->getAssetUUID(), 1.0);
}
}
- LLTaskInvFVBridge::performAction(folder, model, action);
+ LLTaskInvFVBridge::performAction(model, action);
}
void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
@@ -1208,7 +1210,7 @@ LLTaskObjectBridge::LLTaskObjectBridge(
LLUIImagePtr LLTaskObjectBridge::getIcon() const
{
BOOL item_is_multi = FALSE;
- if ( mFlags & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
+ if ( mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
{
item_is_multi = TRUE;
}
@@ -1527,6 +1529,7 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par
mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&do_nothing));
mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&do_nothing));
mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&do_nothing));
+ mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars));
}
// Destroys the object
@@ -1615,7 +1618,7 @@ void LLPanelObjectInventory::reset()
}
void LLPanelObjectInventory::inventoryChanged(LLViewerObject* object,
- InventoryObjectList* inventory,
+ LLInventoryObject::object_list_t* inventory,
S32 serial_num,
void* data)
{
@@ -1632,7 +1635,7 @@ void LLPanelObjectInventory::inventoryChanged(LLViewerObject* object,
// refresh any properties floaters that are hanging around.
if(inventory)
{
- for (InventoryObjectList::const_iterator iter = inventory->begin();
+ for (LLInventoryObject::object_list_t::const_iterator iter = inventory->begin();
iter != inventory->end(); )
{
LLInventoryObject* item = *iter++;
@@ -1665,7 +1668,7 @@ void LLPanelObjectInventory::updateInventory()
if (objectp)
{
LLInventoryObject* inventory_root = objectp->getInventoryRoot();
- InventoryObjectList contents;
+ LLInventoryObject::object_list_t contents;
objectp->getInventoryContents(contents);
if (inventory_root)
{
@@ -1719,7 +1722,7 @@ void LLPanelObjectInventory::updateInventory()
// leads to an N^2 based on the category count. This could be greatly
// speeded with an efficient multimap implementation, but we don't
// have that in our current arsenal.
-void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root, InventoryObjectList& contents)
+void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root, LLInventoryObject::object_list_t& contents)
{
if (!inventory_root)
{
@@ -1748,7 +1751,7 @@ void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root
typedef std::pair<LLInventoryObject*, LLFolderViewFolder*> obj_folder_pair;
-void LLPanelObjectInventory::createViewsForCategory(InventoryObjectList* inventory,
+void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_list_t* inventory,
LLInventoryObject* parent,
LLFolderViewFolder* folder)
{
@@ -1757,8 +1760,8 @@ void LLPanelObjectInventory::createViewsForCategory(InventoryObjectList* invento
LLTaskInvFVBridge* bridge;
LLFolderViewItem* view;
- InventoryObjectList::iterator it = inventory->begin();
- InventoryObjectList::iterator end = inventory->end();
+ LLInventoryObject::object_list_t::iterator it = inventory->begin();
+ LLInventoryObject::object_list_t::iterator end = inventory->end();
for( ; it != end; ++it)
{
LLInventoryObject* obj = *it;