diff options
author | Anatoly Spektor <aspektor@redhat.com> | 2012-08-24 15:46:26 -0400 |
---|---|---|
committer | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-08-28 13:57:50 -0400 |
commit | ce67da633501ca7f46ae5739cc12b5af84e7fa58 (patch) | |
tree | b25914510ae2ac351c44bad708a504737972e920 /bundles/org.eclipse.swt/Eclipse SWT Drag and Drop | |
parent | 9298b2b5e4c70841e967d5ebec2fff49d69edcf8 (diff) | |
download | eclipse.platform.swt-ce67da633501ca7f46ae5739cc12b5af84e7fa58.tar.gz eclipse.platform.swt-ce67da633501ca7f46ae5739cc12b5af84e7fa58.tar.xz eclipse.platform.swt-ce67da633501ca7f46ae5739cc12b5af84e7fa58.zip |
Omit use of deprecated gdk_utf8_to_compound_text() in newer GTK+
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java | 7 |
1 files changed, 6 insertions, 1 deletions
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 f6de5c5d92..6e2a842c06 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 @@ -76,7 +76,12 @@ public void javaToNative (Object object, TransferData transferData) { int[] format = new int[1]; int /*long*/[] ctext = new int /*long*/[1]; int[] length = new int[1]; - boolean result = OS.gdk_utf8_to_compound_text(utf8, encoding, format, ctext, length); + boolean result; + if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) { + result = OS.gdk_x11_display_utf8_to_compound_text (OS.gdk_display_get_default(), utf8, encoding, format, ctext, length); + } else { + result = OS.gdk_utf8_to_compound_text(utf8, encoding, format, ctext, length); + } if (!result) return; transferData.type = encoding[0]; transferData.format = format[0]; |