summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinventorybridge.cpp13
-rw-r--r--indra/newview/llinventorybridge.h15
-rw-r--r--indra/newview/llinventorygallery.cpp12
3 files changed, 19 insertions, 21 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 5d793cdac1..f582207614 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -89,24 +89,11 @@
void copy_slurl_to_clipboard_callback_inv(const std::string& slurl);
-typedef std::pair<LLUUID, LLUUID> two_uuids_t;
-typedef std::list<two_uuids_t> two_uuids_list_t;
-
const F32 SOUND_GAIN = 1.0f;
-struct LLMoveInv
-{
- LLUUID mObjectID;
- LLUUID mCategoryID;
- two_uuids_list_t mMoveList;
- void (*mCallback)(S32, void*);
- void* mUserData;
-};
-
using namespace LLOldEvents;
// Function declarations
-bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, boost::shared_ptr<LLMoveInv>);
bool confirm_attachment_rez(const LLSD& notification, const LLSD& response);
void teleport_via_landmark(const LLUUID& asset_id);
static bool check_category(LLInventoryModel* model,
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 30a9bbe372..1990545381 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -48,7 +48,8 @@ class LLViewerJointAttachment;
class LLFolderView;
typedef std::vector<std::string> menuentry_vec_t;
-
+typedef std::pair<LLUUID, LLUUID> two_uuids_t;
+typedef std::list<two_uuids_t> two_uuids_list_t;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInvFVBridge
//
@@ -772,4 +773,16 @@ public:
bool canWearSelected(const uuid_vec_t& item_ids) const;
};
+struct LLMoveInv
+{
+ LLUUID mObjectID;
+ LLUUID mCategoryID;
+ two_uuids_list_t mMoveList;
+ void (*mCallback)(S32, void*);
+ void* mUserData;
+};
+
+void warn_move_inventory(LLViewerObject* object, boost::shared_ptr<LLMoveInv> move_inv);
+bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, boost::shared_ptr<LLMoveInv>);
+
#endif // LL_LLINVENTORYBRIDGE_H
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index d76f0a45b2..0cff30f1aa 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -2714,6 +2714,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
// coming from a task. Need to figure out if the person can
// move/copy this item.
LLPermissions perm(inv_item->getPermissions());
+ bool is_move = false;
if ((perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID())
&& perm.allowTransferTo(gAgent.getID())))
// || gAgent.isGodlike())
@@ -2725,6 +2726,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
// If the object cannot be copied, but the object the
// inventory is owned by the agent, then the item can be
// moved from the task to agent inventory.
+ is_move = true;
accept = TRUE;
}
@@ -2749,9 +2751,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
if (accept && drop)
{
- //todo: dnd from SOURCE_WORLD
-
- /*boost::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
+ boost::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
move_inv->mObjectID = inv_item->getParentUUID();
std::pair<LLUUID, LLUUID> item_pair(folder_id, inv_item->getUUID());
move_inv->mMoveList.push_back(item_pair);
@@ -2769,7 +2769,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop,
LLNotification::Params params("MoveInventoryFromObject");
params.functor.function(boost::bind(move_task_inventory_callback, _1, _2, move_inv));
LLNotifications::instance().forceResponse(params, 0);
- }*/
+ }
}
}
else if(LLToolDragAndDrop::SOURCE_NOTECARD == source)
@@ -3185,9 +3185,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat,
}
else
{
- //todo: dnd from SOURCE_WORLD
- accept = FALSE;
- //accept = move_inv_category_world_to_agent(cat_id, mUUID, drop, NULL, NULL, filter);
+ accept = move_inv_category_world_to_agent(cat_id, dest_id, drop);
}
}
else if (LLToolDragAndDrop::SOURCE_LIBRARY == source)