summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2009-12-03 11:48:28 -0800
committerRick Pasetto <rick@lindenlab.com>2009-12-03 11:48:28 -0800
commitc272582ab78d43c595eefb843126c999c09dfd4f (patch)
treebca508549ad452fc7c6b488cddff6c3bc9b2ed7a /indra/newview/llviewerwindow.cpp
parentaae1917d2e7a5af03f525d44eb177317495ead29 (diff)
Change API to no longer include slurl argument (its a platform-agnostic policy), add some code (not working yet) to implement DND on the mac
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index f953a45890..fe6c9439bb 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -822,16 +822,16 @@ BOOL LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MAS
return TRUE;
}
-BOOL LLViewerWindow::handleDragNDrop( LLWindow *window, LLCoordGL pos, MASK mask, BOOL drop, std::string data, BOOL slurl )
+LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *window, LLCoordGL pos, MASK mask, BOOL drop, std::string data)
{
- BOOL result = FALSE;
+ LLWindowCallbacks::DragNDropResult result = LLWindowCallbacks::DND_NONE;
if (gSavedSettings.getBOOL("PrimMediaDragNDrop"))
{
// special case SLURLs
- if ( slurl )
+ if ( std::string::npos != data.find("slurl.com") )
{
LLURLDispatcher::dispatch( data, NULL, true );
- return TRUE;
+ return LLWindowCallbacks::DND_MOVE;
};
LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY, TRUE /*BOOL pick_transparent*/ );
@@ -863,24 +863,30 @@ BOOL LLViewerWindow::handleDragNDrop( LLWindow *window, LLCoordGL pos, MASK mas
// XXX This shouldn't be necessary, should it ?!?
obj->getMediaImpl(object_face)->navigateReload();
obj->sendMediaDataUpdate();
+
+ result = LLWindowCallbacks::DND_COPY;
}
else {
// just navigate to the URL
obj->getMediaImpl(object_face)->navigateTo(url);
+
+ result = LLWindowCallbacks::DND_LINK;
}
LLSelectMgr::getInstance()->unhighlightObjectOnly(mDragHoveredObject);
mDragHoveredObject = NULL;
+
}
else {
mDragHoveredObject = obj;
// Highlight the dragged object
LLSelectMgr::getInstance()->highlightObjectOnly(mDragHoveredObject);
+
+ result = (! te->hasMedia()) ? LLWindowCallbacks::DND_COPY : LLWindowCallbacks::DND_LINK;
}
- result = TRUE;
}
}
- if (!result && !mDragHoveredObject.isNull())
+ if (result == LLWindowCallbacks::DND_NONE && !mDragHoveredObject.isNull())
{
LLSelectMgr::getInstance()->unhighlightObjectOnly(mDragHoveredObject);
mDragHoveredObject = NULL;
@@ -3312,8 +3318,8 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_trans
}
else
{
- llwarns << "List of last picks is empty" << llendl;
- llwarns << "Using stub pick" << llendl;
+ lldebugs << "List of last picks is empty" << llendl;
+ lldebugs << "Using stub pick" << llendl;
mLastPick = LLPickInfo();
}