diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java index 16b38fd6586..f395d859110 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java @@ -35,6 +35,7 @@ *

* * @see Transfer + * @since 3.125 */ public class TextTransfer extends ByteArrayTransfer { @@ -42,9 +43,11 @@ public class TextTransfer extends ByteArrayTransfer { private static final String COMPOUND_TEXT = "COMPOUND_TEXT"; //$NON-NLS-1$ private static final String UTF8_STRING = "UTF8_STRING"; //$NON-NLS-1$ private static final String STRING = "STRING"; //$NON-NLS-1$ + private static final String TEXTPLAINUTF8 = "text/plain;charset=utf-8"; private static final int COMPOUND_TEXT_ID = GTK.GTK4 ? 0 : registerType(COMPOUND_TEXT); private static final int UTF8_STRING_ID = GTK.GTK4 ? 0 : registerType(UTF8_STRING); private static final int STRING_ID = GTK.GTK4 ? 0 : registerType(STRING); + private static final int TEXTPLAINUTF8_ID = GTK.GTK4 ? 0 : registerType(TEXTPLAINUTF8); private TextTransfer() {} @@ -145,7 +148,7 @@ protected int[] getTypeIds() { if(GTK.GTK4) { return new int[] {(int) OS.G_TYPE_STRING()}; } - return new int[] {UTF8_STRING_ID, STRING_ID}; + return new int[] {UTF8_STRING_ID, STRING_ID, TEXTPLAINUTF8_ID}; } @Override @@ -157,7 +160,7 @@ protected String[] getTypeNames() { return new String[] {"text/plain", STRING}; } - return new String[] {UTF8_STRING, STRING}; + return new String[] {UTF8_STRING, STRING, TEXTPLAINUTF8}; } boolean checkText(Object object) {