diff options
author | Christian Goetze <cg@lindenlab.com> | 2009-03-13 21:28:40 +0000 |
---|---|---|
committer | Christian Goetze <cg@lindenlab.com> | 2009-03-13 21:28:40 +0000 |
commit | 1aa0416aef379bb3ad1012441588b6d7fab81b40 (patch) | |
tree | 14a247470bd0d508aba923dc00e940b961d304da /indra/newview/llpanelavatar.cpp | |
parent | 7573288ab3ede23f97bff2f5caefcb622e7e9842 (diff) |
svn merge -r114093:114412 svn+ssh://svn.lindenlab.com/svn/linden/branches/featurettes/featurettes-batch5-merge
Melinda (coco): 5th and final batch of featurettes. My work here is done.
Diffstat (limited to 'indra/newview/llpanelavatar.cpp')
-rw-r--r-- | indra/newview/llpanelavatar.cpp | 74 |
1 files changed, 5 insertions, 69 deletions
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 41f8f3941a..7253d758ea 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -138,79 +138,15 @@ BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EAcceptance* accept, std::string& tooltip_msg) { - BOOL handled = FALSE; if(getParent()) { - // check if inside - //LLRect parent_rect = mParentView->getRect(); - //getRect().set(0, parent_rect.getHeight(), parent_rect.getWidth(), 0); - handled = TRUE; + LLToolDragAndDrop::handleGiveDragAndDrop(mAgentID, LLUUID::null, drop, + cargo_type, cargo_data, accept); - // check the type - switch(cargo_type) - { - case DAD_TEXTURE: - case DAD_SOUND: - case DAD_LANDMARK: - case DAD_SCRIPT: - case DAD_OBJECT: - case DAD_NOTECARD: - case DAD_CLOTHING: - case DAD_BODYPART: - case DAD_ANIMATION: - case DAD_GESTURE: - { - LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data; - if(gInventory.getItem(inv_item->getUUID()) - && LLToolDragAndDrop::isInventoryGiveAcceptable(inv_item)) - { - // *TODO: get multiple object transfers working - *accept = ACCEPT_YES_COPY_SINGLE; - if(drop) - { - LLToolDragAndDrop::giveInventory(mAgentID, inv_item); - } - } - else - { - // It's not in the user's inventory (it's probably - // in an object's contents), so disallow dragging - // it here. You can't give something you don't - // yet have. - *accept = ACCEPT_NO; - } - break; - } - case DAD_CATEGORY: - { - LLViewerInventoryCategory* inv_cat = (LLViewerInventoryCategory*)cargo_data; - if( gInventory.getCategory( inv_cat->getUUID() ) ) - { - // *TODO: get multiple object transfers working - *accept = ACCEPT_YES_COPY_SINGLE; - if(drop) - { - LLToolDragAndDrop::giveInventoryCategory(mAgentID, - inv_cat); - } - } - else - { - // It's not in the user's inventory (it's probably - // in an object's contents), so disallow dragging - // it here. You can't give something you don't - // yet have. - *accept = ACCEPT_NO; - } - break; - } - case DAD_CALLINGCARD: - default: - *accept = ACCEPT_NO; - break; - } + return TRUE; } - return handled; + + return FALSE; } |