summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Accessibility
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2010-05-20 14:17:07 +0000
committerSilenio Quarti <silenio>2010-05-20 14:17:07 +0000
commit3a15463365b45a97473205b008d442cefe8a671f (patch)
treeb63c3390f3872c9ba2fb53f70dc6ee9899d3b6da /bundles/org.eclipse.swt/Eclipse SWT Accessibility
parent303960b3a16409637e6f45a0816fe9808bc1fafa (diff)
downloadeclipse.platform.swt-3a15463365b45a97473205b008d442cefe8a671f.tar.gz
eclipse.platform.swt-3a15463365b45a97473205b008d442cefe8a671f.tar.xz
eclipse.platform.swt-3a15463365b45a97473205b008d442cefe8a671f.zip
Bug 312927 - CTabItem role description not the same as TabItem
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Accessibility')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java26
1 files changed, 15 insertions, 11 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java
index faf58af49c..bb3c5cc05f 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java
@@ -1782,18 +1782,22 @@ public class Accessible {
listener.getRole(event);
}
if (event.detail != -1) {
- String appRole = roleToOs (event.detail);
- String appSubrole = null;
- int index = appRole.indexOf(':');
- if (index != -1) {
- appSubrole = appRole.substring(index + 1);
- appRole = appRole.substring(0, index);
+ if (event.detail == ACC.ROLE_TABITEM) {
+ returnValue = new NSString(OS.NSAccessibilityRoleDescription (NSString.stringWith("AXTab").id, 0));
+ } else {
+ String appRole = roleToOs (event.detail);
+ String appSubrole = null;
+ int index = appRole.indexOf(':');
+ if (index != -1) {
+ appSubrole = appRole.substring(index + 1);
+ appRole = appRole.substring(0, index);
+ }
+ NSString nsAppRole = NSString.stringWith(appRole);
+ NSString nsAppSubrole = null;
+
+ if (appSubrole != null) nsAppSubrole = NSString.stringWith(appSubrole);
+ returnValue = new NSString(OS.NSAccessibilityRoleDescription (((nsAppRole != null) ? nsAppRole.id : 0), (nsAppSubrole != null) ? nsAppSubrole.id : 0));
}
- NSString nsAppRole = NSString.stringWith(appRole);
- NSString nsAppSubrole = null;
-
- if (appSubrole != null) nsAppSubrole = NSString.stringWith(appSubrole);
- returnValue = new NSString(OS.NSAccessibilityRoleDescription (((nsAppRole != null) ? nsAppRole.id : 0), (nsAppSubrole != null) ? nsAppSubrole.id : 0));
}
return returnValue;
}