summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2003-05-23 17:49:20 +0000
committerVeronika Irvine <veronika>2003-05-23 17:49:20 +0000
commit057b095fa8e4dd6d39ae5d30c54221920abf599e (patch)
treea48654dde1e5fc68a241bc3d84404165a9d419b0 /bundles/org.eclipse.swt
parent62435db43ad1445461a5499f3ec80cd452c2bb65 (diff)
downloadeclipse.platform.swt-057b095fa8e4dd6d39ae5d30c54221920abf599e.tar.gz
eclipse.platform.swt-057b095fa8e4dd6d39ae5d30c54221920abf599e.tar.xz
eclipse.platform.swt-057b095fa8e4dd6d39ae5d30c54221920abf599e.zip
*** empty log message ***
Diffstat (limited to 'bundles/org.eclipse.swt')
-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) {