Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 147377 Details for
Bug 202414
Link widget has problems with mnemonics
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
202414.patch (text/plain), 2.30 KB, created by
Felipe Heidrich
on 2009-09-16 16:29:58 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Felipe Heidrich
Created:
2009-09-16 16:29:58 EDT
Size:
2.30 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.swt >Index: Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java,v >retrieving revision 1.63 >diff -u -r1.63 Link.java >--- Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java 1 Jul 2009 14:49:40 -0000 1.63 >+++ Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java 16 Sep 2009 20:32:25 -0000 >@@ -412,6 +412,61 @@ > return text; > } > >+boolean mnemonicHit (char key) { >+ if (mnemonics != null) { >+ char uckey = Character.toUpperCase (key); >+ String parsedText = parse(text); >+ for (int i = 0; i < mnemonics.length - 1; i++) { >+ if (mnemonics[i] != -1) { >+ char mnemonic = parsedText.charAt(mnemonics[i]); >+ if (uckey == Character.toUpperCase (mnemonic)) { >+ if (!setFocus ()) return false; >+ if (OS.COMCTL32_MAJOR >= 6) { >+ int bits = OS.GetWindowLong (handle, OS.GWL_STYLE); >+ LITEM item = new LITEM (); >+ item.mask = OS.LIF_ITEMINDEX | OS.LIF_STATE; >+ item.stateMask = OS.LIS_FOCUSED; >+ while (item.iLink < mnemonics.length) { >+ if (item.iLink != i) OS.SendMessage (handle, OS.LM_SETITEM, 0, item); >+ item.iLink++; >+ } >+ item.iLink = i; >+ item.state = OS.LIS_FOCUSED; >+ OS.SendMessage (handle, OS.LM_SETITEM, 0, item); >+ >+ /* Feature in Windows. For some reason, setting the focus to >+ * any item but first causes the control to clear the WS_TABSTOP >+ * bit. The fix is always to reset the bit. >+ */ >+ OS.SetWindowLong (handle, OS.GWL_STYLE, bits); >+ } else { >+ focusIndex = i; >+ redraw (); >+ } >+ return true; >+ } >+ } >+ } >+ } >+ return false; >+} >+ >+boolean mnemonicMatch (char key) { >+ if (mnemonics != null) { >+ char uckey = Character.toUpperCase (key); >+ String parsedText = parse(text); >+ for (int i = 0; i < mnemonics.length - 1; i++) { >+ if (mnemonics[i] != -1) { >+ char mnemonic = parsedText.charAt(mnemonics[i]); >+ if (uckey == Character.toUpperCase (mnemonic)) { >+ return true; >+ } >+ } >+ } >+ } >+ return false; >+} >+ > String parse (String string) { > int length = string.length (); > offsets = new Point [length / 4];
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 202414
:
147129
| 147377