-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag and Drop made available for a label that has an Image view. #713
Conversation
7aa565f
to
dcbd786
Compare
what's the status of this? |
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
d34090c
to
a7a1c8b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have two concerns that I think need attention.
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
FYI, I think most people prefer that you amend commits so that there is a single commit in the PR. I know that multiple commits tend to confuse me personally. |
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
c551e2b
to
2af4199
Compare
I have tested :
|
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Show resolved
Hide resolved
2af4199
to
1d9e062
Compare
@merks: Are your concerns addressed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't say I understand all the details, but it okay.
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
82a7570
to
57162a1
Compare
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
57162a1
to
3803379
Compare
3803379
to
c1cb93a
Compare
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
c1cb93a
to
02d06d7
Compare
@lshanmug Is anything else required on this PR ? If yes, please let me know. |
@lshanmug Were you able to check on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elsazac Added comments as discussed. Please fix formatting as well.
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
02d06d7
to
b12ba3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. @elsazac Please rebase.
bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
Outdated
Show resolved
Hide resolved
a4a8e90
to
25faa47
Compare
25faa47
to
988fac9
Compare
@elsazac Let's merge once M1 is out. |
M1 has been pushed to simrel already eclipse-simrel/simrel.build@afe289a |
In the method dropTargetProc(long id, long sel, long arg0) the widget was being recognised as label instead of the widget that actually has the drop Target key. As soon as the first drop target key is acquired the area is recognised as a Drop Target area and the Drag handlers are added. Also a new function called handleLabels( Control c, long cls) is also added to bring the feature of droping on to the top of a label that has an image view.This functions takes a control as a parameter to go up till its parent to find the label which has an image view and add drag handlers for that. Fixes: eclipse-platform#649
988fac9
to
11830be
Compare
Thanks @elsazac for the fix! |
Bringing the required changes to
DropTarget.java
In the method
static long dropTargetProc(long id, long sel, long arg0
), the label widget that doesn't actaully have a drop target key was being checked to see if it has a drop target key or not instead of the widget that actually has the drop Target key. So the code eventually failed to recognise label as an area where drop is possible. As soon as we get a label as a widget, the modified code checks for the label's parent to see if drop target key is present or not. If present the area is recognised for drop.Also a new function called
private void handleLabels(Control c)
is also added to bring the feature of dropping on to the top of a label that has an image view. This functions takes a control as a parameter to go up the hierarchy till its parent to find the label which has an image view and add drag handlers for that.Fixes: #649
cc/ @lshanmug