Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2011-11-25 21:37:16 +0000
committerSilenio Quarti2011-11-25 22:39:28 +0000
commitd063d47bbb5216b9ffb5149930a7861e3c2c535f (patch)
tree994fafba80845c156aa42ead8d05fad7d2f72afe
parent16c892a0a1f4425e541ae0e9187e1610b947a1c4 (diff)
downloadeclipse.platform.ui-d063d47bbb5216b9ffb5149930a7861e3c2c535f.tar.gz
eclipse.platform.ui-d063d47bbb5216b9ffb5149930a7861e3c2c535f.tar.xz
eclipse.platform.ui-d063d47bbb5216b9ffb5149930a7861e3c2c535f.zip
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 530b331cdf0..4d58088f3d0 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);
+ }
}
}
}

Back to the top