diff options
author | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-09-28 10:33:42 -0400 |
---|---|---|
committer | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-09-28 10:33:42 -0400 |
commit | 71e1311cbbe9e51dc606d59ab142f6565e43ed78 (patch) | |
tree | 31f9b4fb8957b22c2607013ea294c936f334098d /bundles/org.eclipse.swt/Eclipse SWT Drag and Drop | |
parent | c7cbced32992f5cff36e25ce2932835717af3cbb (diff) | |
download | eclipse.platform.swt-71e1311cbbe9e51dc606d59ab142f6565e43ed78.tar.gz eclipse.platform.swt-71e1311cbbe9e51dc606d59ab142f6565e43ed78.tar.xz eclipse.platform.swt-71e1311cbbe9e51dc606d59ab142f6565e43ed78.zip |
Bug 389702 - Drag and drop a tab item to desktop/Finder, a text file is created, not a web link is generated. - use OS const for public.url
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop')
4 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java index 3c311372e5..41617fb9d7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java @@ -291,7 +291,7 @@ public Object getContents(Transfer transfer, int clipboards) { tdata.data = pasteboard.stringForType(type); } else if (type.isEqual(OS.NSFilenamesPboardType)) { tdata.data = new NSArray(pasteboard.propertyListForType(type).id); - } else if (type.isEqual(OS.NSURLPboardType) || type.getString().equals("public.url")) { + } else if (type.isEqual(OS.NSURLPboardType) || type.isEqual(OS.kUTTypeURL)) { tdata.data = NSURL.URLFromPasteboard(pasteboard); } else { tdata.data = pasteboard.dataForType(type); @@ -459,7 +459,7 @@ public void setContents(Object[] data, Transfer[] dataTypes, int clipboards) { dataType.isEqual(OS.NSRTFPboardType) || dataType.isEqual(OS.NSHTMLPboardType)) { pasteboard.setString((NSString) tdata, dataType); - } else if (dataType.isEqual(OS.NSURLPboardType) || dataType.getString().equals("public.url")) { + } else if (dataType.isEqual(OS.NSURLPboardType) || dataType.isEqual(OS.kUTTypeURL)) { NSURL url = (NSURL) tdata; url.writeToPasteboard(pasteboard); } else if (dataType.isEqual(OS.NSFilenamesPboardType)) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java index 70b7149169..7913169496 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java @@ -751,7 +751,7 @@ void pasteboard_provideDataForType(long /*int*/ id, long /*int*/ sel, long /*int dataType.isEqual(OS.NSHTMLPboardType) || dataType.isEqual(OS.NSRTFPboardType)) { pasteboard.setString((NSString) tdata, dataType); - } else if (dataType.isEqual(OS.NSURLPboardType) || dataType.getString().equals("public.url")) { + } else if (dataType.isEqual(OS.NSURLPboardType) || dataType.isEqual(OS.kUTTypeURL)) { NSURL url = (NSURL) tdata; url.writeToPasteboard(pasteboard); } else if (dataType.isEqual(OS.NSFilenamesPboardType)) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java index 79c7a0b691..ad379cb18d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java @@ -692,7 +692,7 @@ boolean drop(NSObject sender) { type.isEqual(OS.NSHTMLPboardType) || type.isEqual(OS.NSRTFPboardType)) { tdata.data = pasteboard.stringForType(type); - } else if (type.isEqual(OS.NSURLPboardType) || type.getString().equals("public.url")) { + } else if (type.isEqual(OS.NSURLPboardType) || type.isEqual(OS.kUTTypeURL)) { tdata.data = NSURL.URLFromPasteboard(pasteboard); } else if (type.isEqual(OS.NSFilenamesPboardType)) { tdata.data = new NSArray(pasteboard.propertyListForType(type).id); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/URLTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/URLTransfer.java index 3266309332..482addd71e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/URLTransfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/URLTransfer.java @@ -30,7 +30,7 @@ import org.eclipse.swt.internal.cocoa.*; public class URLTransfer extends ByteArrayTransfer { static URLTransfer _instance = new URLTransfer(); - static final String URL = OS.VERSION >= 0x1060 ? "public.url" /* kUTTypeURL */ : OS.NSURLPboardType.getString(); + static final String URL = (OS.VERSION >= 0x1060 ? OS.kUTTypeURL : OS.NSURLPboardType).getString(); static final int URL_ID = registerType(URL); private URLTransfer() {} |