From 2b863df7c8fdede8db5d30349f7778d9f7897e28 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 20 May 2008 23:24:16 +0000 Subject: svn merge -r87877:87878 svn+ssh://svn.lindenlab.com/svn/linden/branches/maint-ui/maint-ui-12-qa-5 which is the last iteration of the maint-ui series of branches. Future work will be in featurettes. --- indra/newview/llimpanel.cpp | 48 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 6 deletions(-) (limited to 'indra/newview/llimpanel.cpp') diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index ba43352eb5..e58db2988f 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1601,12 +1601,48 @@ BOOL LLFloaterIMPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, BOOL accepted = FALSE; switch(cargo_type) { - case DAD_CALLINGCARD: - accepted = dropCallingCard((LLInventoryItem*)cargo_data, drop); - break; - case DAD_CATEGORY: - accepted = dropCategory((LLInventoryCategory*)cargo_data, drop); - break; + case DAD_CALLINGCARD: + { + accepted = dropCallingCard((LLInventoryItem*)cargo_data, drop); + break; + } + case DAD_CATEGORY: + { + accepted = dropCategory((LLInventoryCategory*)cargo_data, drop); + break; + } + + // See stdenums.h + case DAD_TEXTURE: + case DAD_SOUND: + // DAD_CALLINGCARD above + case DAD_LANDMARK: + case DAD_SCRIPT: + case DAD_CLOTHING: + case DAD_OBJECT: + case DAD_NOTECARD: + // DAD_CATEGORY above + case DAD_BODYPART: + case DAD_ANIMATION: + case DAD_GESTURE: + { + if (mDialog == IM_NOTHING_SPECIAL) + { + // See LLDropTarget for similar code. + LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data; + if(gInventory.getItem(inv_item->getUUID()) + && LLToolDragAndDrop::isInventoryGiveAcceptable(inv_item)) + { + accepted = true; + if(drop) + { + LLToolDragAndDrop::giveInventory(mOtherParticipantUUID, inv_item); + } + } + } + break; + } + default: break; } -- cgit v1.2.3