diff options
author | Silenio Quarti <silenio> | 2010-05-20 14:17:07 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2010-05-20 14:17:07 +0000 |
commit | 3a15463365b45a97473205b008d442cefe8a671f (patch) | |
tree | b63c3390f3872c9ba2fb53f70dc6ee9899d3b6da /bundles/org.eclipse.swt/Eclipse SWT Accessibility | |
parent | 303960b3a16409637e6f45a0816fe9808bc1fafa (diff) | |
download | eclipse.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-x | bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java | 26 |
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; } |