Bug 93466 - CTabFolder does not strip mnemonic correctly
Summary: CTabFolder does not strip mnemonic correctly
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Carolyn MacLeod CLA
QA Contact:
URL:
Whiteboard:
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2005-05-02 17:58 EDT by Dejan Glozic CLA
Modified: 2006-04-04 04:33 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dejan Glozic CLA 2005-05-02 17:58:27 EDT
In CTabFolder.initAccessible:

		public void getName(AccessibleEvent e) {
			String name = null;
			int childID = e.childID;
			if (childID >= 0 && childID < items.length) {
				name = items[childID].getText();
				int index = name.indexOf('&');
				if (index > 0) {
					name = name.substring(0, index) + 
name.substring(index + 1);
				}
			}
			e.result = name;
		}

Note that the index is checked if it is greated than 0, but the actual check 
should be '(index != -1)'. The code above is missing all tab names that start 
with the mnemonic.
Comment 1 Carolyn MacLeod CLA 2006-04-04 04:33:05 EDT
This was fixed in Nov of 05 when some other mnemonic cleanup was done.