summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorCarolyn MacLeod2013-02-21 15:22:30 (EST)
committer Lakshmi Shanmugam2013-02-28 03:26:11 (EST)
commitaffb06e3862648e89ed200291b040d88a91641bc (patch)
tree5abe97ddd113d68d25853abea1af6a42819dbd01
parent3d6911d77dc2e8c782862689ec330e7b8da14a0d (diff)
downloadeclipse.platform.swt-affb06e3862648e89ed200291b040d88a91641bc.zip
eclipse.platform.swt-affb06e3862648e89ed200291b040d88a91641bc.tar.gz
eclipse.platform.swt-affb06e3862648e89ed200291b040d88a91641bc.tar.bz2
Bug 379263 - CTabFolder itself should return accessible name
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
index 9c030fc..9d6d4b0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
@@ -1288,12 +1288,16 @@ void initAccessible() {
final Accessible accessible = getAccessible();
accessible.addAccessibleListener(new AccessibleAdapter() {
public void getName(AccessibleEvent e) {
- String name = null;
+ CTabItem item = null;
int childID = e.childID;
- if (childID >= 0 && childID < items.length) {
- name = stripMnemonic(items[childID].getText());
+ if (childID == ACC.CHILDID_SELF) {
+ if (selectedIndex != -1) {
+ item = items[selectedIndex];
+ }
+ } else if (childID >= 0 && childID < items.length) {
+ item = items[childID];
}
- e.result = name;
+ e.result = item == null ? null : stripMnemonic(item.getText());
}
public void getHelp(AccessibleEvent e) {