summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2003-05-23 18:04:45 +0000
committerVeronika Irvine <veronika>2003-05-23 18:04:45 +0000
commit8f973b81a9326cb2d54fc213c53b864c1acb60e0 (patch)
tree376286dfceb11bc201d86edeae9e55b59c75acc5
parent7bd947738fdbce7a77bab7cca29b58c49f2eb787 (diff)
downloadeclipse.platform.swt-8f973b81a9326cb2d54fc213c53b864c1acb60e0.tar.gz
eclipse.platform.swt-8f973b81a9326cb2d54fc213c53b864c1acb60e0.tar.xz
eclipse.platform.swt-8f973b81a9326cb2d54fc213c53b864c1acb60e0.zip
*** empty log message ***v2134d
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DragSource.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java6
2 files changed, 13 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DragSource.java
index 49f4c0a8d9..836490193a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DragSource.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DragSource.java
@@ -292,7 +292,9 @@ private void drag(Event dragEvent) {
int operations = opToOsOp(getStyle());
//set operations twice - local and not local
OS.SetDragAllowableActions(theDrag[0], operations, true);
- OS.SetDragAllowableActions(theDrag[0], operations, false);
+ // until the interaction with Finder is understood, only allow data to be
+ // transferred internally
+ OS.SetDragAllowableActions(theDrag[0], OS.kDragActionNothing, false);
int result = OS.TrackDrag(theDrag[0], theEvent, theRegion);
@@ -357,6 +359,9 @@ private int opToOsOp(int operation) {
osOperation |= OS.kDragActionAlias;
}
if ((operation & DND.DROP_MOVE) != 0) {
+ osOperation |= OS.kDragActionMove;
+ }
+ if ((operation & DND.DROP_TARGET_MOVE) != 0) {
osOperation |= OS.kDragActionDelete;
}
return osOperation;
@@ -371,6 +376,9 @@ private int osOpToOp(int osOperation){
operation |= DND.DROP_LINK;
}
if ((osOperation & OS.kDragActionDelete) != 0) {
+ operation |= DND.DROP_TARGET_MOVE;
+ }
+ if ((osOperation & OS.kDragActionMove) != 0) {
operation |= DND.DROP_MOVE;
}
if (osOperation == OS.kDragActionAll) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java
index f271c022c4..d8cd029493 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java
@@ -508,6 +508,8 @@ private int dragTrackingHandler(int message, int theWindow, int handlerRefCon, i
selectedOperation = event.detail;
}
+ OS.SetDragDropAction(theDrag, opToOsOp(selectedOperation));
+
effect.show(event.feedback, event.x, event.y);
switch (selectedOperation) {
@@ -592,7 +594,7 @@ private int opToOsOp(int operation) {
osOperation |= OS.kDragActionAlias;
}
if ((operation & DND.DROP_MOVE) != 0) {
- osOperation |= OS.kDragActionDelete;
+ osOperation |= OS.kDragActionMove;
}
return osOperation;
}
@@ -605,7 +607,7 @@ private int osOpToOp(int osOperation){
if ((osOperation & OS.kDragActionAlias) != 0) {
operation |= DND.DROP_LINK;
}
- if ((osOperation & OS.kDragActionDelete) != 0) {
+ if ((osOperation & OS.kDragActionMove) != 0) {
operation |= DND.DROP_MOVE;
}
if (osOperation == OS.kDragActionAll) {