aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2011-11-25 16:37:16 (EST)
committerSilenio Quarti2011-11-25 17:39:28 (EST)
commitd063d47bbb5216b9ffb5149930a7861e3c2c535f (patch)
tree994fafba80845c156aa42ead8d05fad7d2f72afe
parent16c892a0a1f4425e541ae0e9187e1610b947a1c4 (diff)
downloadeclipse.platform.swt-d063d47bbb5216b9ffb5149930a7861e3c2c535f.zip
eclipse.platform.swt-d063d47bbb5216b9ffb5149930a7861e3c2c535f.tar.gz
eclipse.platform.swt-d063d47bbb5216b9ffb5149930a7861e3c2c535f.tar.bz2
Protect gtk_tooltips_set tip for gtk prior to version 2.12.0.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
index 530b331..4d58088 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
@@ -810,7 +810,11 @@ public void setVisible (boolean visible) {
} else {
int /*long*/ vboxHandle = parent.vboxHandle;
byte[] buffer = Converter.wcsToMbcs(null, "", true);
- OS.gtk_tooltips_set_tip(handle, vboxHandle, buffer, null);
+ if (OS.GTK_VERSION >= OS.VERSION(2, 12, 0)) {
+ OS.gtk_widget_set_tooltip_text(vboxHandle, buffer);
+ } else {
+ OS.gtk_tooltips_set_tip(handle, vboxHandle, buffer, null);
+ }
}
}
}