diff options
author | Alexander Kurtakov <akurtako@redhat.com> | 2011-11-09 23:19:05 +0200 |
---|---|---|
committer | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2011-11-25 12:07:28 -0500 |
commit | fc36e7255b8f05c052b350823b359de456f7d78b (patch) | |
tree | cd8cd8d9182376bf31f91bf4bea0fdbbd1fd19ae /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java | |
parent | fb6589b64340ba0188ea90d333c916c8736110eb (diff) | |
download | eclipse.platform.swt-fc36e7255b8f05c052b350823b359de456f7d78b.tar.gz eclipse.platform.swt-fc36e7255b8f05c052b350823b359de456f7d78b.tar.xz eclipse.platform.swt-fc36e7255b8f05c052b350823b359de456f7d78b.zip |
gtk_tooltips_set_tip is dynamic now
Code using it was either conditionalized before or done with this patch.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java | 12 |
1 files changed, 8 insertions, 4 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 8fa7d4b1fb..530b331cdf 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 @@ -794,10 +794,14 @@ public void setVisible (boolean visible) { if (text.length () > 0) string.append ("\n\n"); string.append (message); byte [] buffer = Converter.wcsToMbcs (null, string.toString(), true); - OS.gtk_tooltips_set_tip (handle, vboxHandle, buffer, null); - int /*long*/ data = OS.gtk_tooltips_data_get (vboxHandle); - OS.GTK_TOOLTIPS_SET_ACTIVE (handle, data); - 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); + int /*long*/ data = OS.gtk_tooltips_data_get (vboxHandle); + OS.GTK_TOOLTIPS_SET_ACTIVE (handle, data); + OS.gtk_tooltips_set_tip (handle, vboxHandle, buffer, null); + } } if (autohide) timerId = OS.g_timeout_add (DELAY, display.windowTimerProc, handle); } else { |