From 9e301b882d171ae009d1e8510320190a588dbc21 Mon Sep 17 00:00:00 2001 From: Carolyn MacLeod Date: Tue, 17 Jul 2012 15:53:16 -0400 Subject: Bug 384725 - linux accessibility broken --- .../Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt') diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java index 8be8ddb1be..03ba2a3113 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java @@ -1165,7 +1165,15 @@ public void setToolTipText (String string) { } void setToolTipText (Shell shell, String newString) { - shell.setToolTipText (handle, newString); + int /*long*/ child = OS.gtk_bin_get_child (handle); + if ((style & SWT.DROP_DOWN) != 0) { + if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) { + int /*long*/ list = OS.gtk_container_get_children (child); + child = OS.g_list_nth_data (list, 0); + } + if (arrowHandle != 0) shell.setToolTipText (arrowHandle, newString); + } + shell.setToolTipText (child != 0 ? child : handle, newString); } /** -- cgit