--- a/MenuPanel.st Mon Feb 04 11:37:27 2008 +0100
+++ b/MenuPanel.st Mon Feb 04 13:18:47 2008 +0100
@@ -21,7 +21,7 @@
lastPointerView openDelayedMenuBlock preferredWidth application
originator centerItems hideOnRelease defaultHideOnRelease
buttonInsetX buttonInsetY itemSpace activeBackgroundColor
- stringOffsetX'
+ stringOffsetX doAccessCharacterTranslation'
classVariableNames:'InitialSelectionQuerySignal Images LigthenedImages
DefaultForegroundColor DefaultBackgroundColor IconIndicationOn
IconIndicationOff IconRadioOn IconRadioOff
@@ -1079,6 +1079,13 @@
self itemAt:stringOrNumber do:[:el| el argument:anArgument ]
!
+doAccessCharacterTranslation:aBoolean
+ "true if &-chars in a label are to be treated as accessCharacter indicators.
+ Can be set to false to leave labels unchanged"
+
+ doAccessCharacterTranslation := aBoolean
+!
+
enteredItem
"return the item over which the mouse pointer is located;
nil if the mouse is not over any item"
@@ -4280,7 +4287,7 @@
].
rKey := aKeyEvent rawKey.
item := nil.
- menu := self detectGrabMenu. "/ first lookup the current grapMenu before starting in the topMenu
+ menu := self detectGrabMenu. "/ first lookup the current grabMenu before starting in the topMenu
[true] whileTrue:[
list := menu
@@ -5508,15 +5515,17 @@
displayLabel := displayLabel asArray.
]
].
- displayLabel notNil ifTrue:[
- displayLabel isArray ifTrue:[
- displayLabel keysAndValuesDo:[:i :el|
- el notNil ifTrue:[
- displayLabel at:i put:(self updateAccessCharacterFor:el).
+ menuPanel doAccessCharacterTranslation ifTrue:[
+ displayLabel notNil ifTrue:[
+ displayLabel isArray ifTrue:[
+ displayLabel keysAndValuesDo:[:i :el|
+ el notNil ifTrue:[
+ displayLabel at:i put:(self updateAccessCharacterFor:el).
+ ].
].
+ ] ifFalse:[
+ displayLabel := self updateAccessCharacterFor:displayLabel.
].
- ] ifFalse:[
- displayLabel := self updateAccessCharacterFor:displayLabel.
].
].
@@ -7908,7 +7917,7 @@
!MenuPanel class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.455 2008-01-27 15:59:07 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.456 2008-02-04 12:18:47 cg Exp $'
! !
MenuPanel initialize!