diff options
author | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-11-16 11:36:11 -0500 |
---|---|---|
committer | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-11-16 11:36:11 -0500 |
commit | 7b284503d08592dbddb77a19eb2de58b2bbcf267 (patch) | |
tree | 42ada4606229ab06f61a9caf23064afa0217673d | |
parent | 5ed9391060e1aab8e1f0348a337191397f8d0889 (diff) | |
download | eclipse.platform.swt-7b284503d08592dbddb77a19eb2de58b2bbcf267.tar.gz eclipse.platform.swt-7b284503d08592dbddb77a19eb2de58b2bbcf267.tar.xz eclipse.platform.swt-7b284503d08592dbddb77a19eb2de58b2bbcf267.zip |
Bug 389702 - Drag and drop a tab item to desktop/Finder, a text file is created, not a web link is generated
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/URLTransfer.java | 16 |
1 files changed, 13 insertions, 3 deletions
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 482addd71e..8d060e68f7 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,8 +30,10 @@ import org.eclipse.swt.internal.cocoa.*; public class URLTransfer extends ByteArrayTransfer { static URLTransfer _instance = new URLTransfer(); - static final String URL = (OS.VERSION >= 0x1060 ? OS.kUTTypeURL : OS.NSURLPboardType).getString(); + static final String URL = OS.NSURLPboardType.getString(); + static final String URL1 = OS.kUTTypeURL.getString(); static final int URL_ID = registerType(URL); + static final int URL_ID1 = registerType(URL1); private URLTransfer() {} @@ -83,11 +85,19 @@ public Object nativeToJava(TransferData transferData){ } protected int[] getTypeIds(){ - return new int[] {URL_ID}; + if (OS.VERSION >= 0x1060) { + return new int[] {URL_ID, URL_ID1}; + } else { + return new int[] {URL_ID}; + } } protected String[] getTypeNames(){ - return new String[] {URL}; + if (OS.VERSION >= 0x1060) { + return new String[] {URL, URL1}; + } else { + return new String[] {URL}; + } } boolean checkURL(Object object) { |