MenuView.st
changeset 2973 cb5ac87985c9
parent 2960 1541221ad19f
child 2975 8c344257ef67
--- a/MenuView.st	Tue May 11 18:41:57 2004 +0200
+++ b/MenuView.st	Wed May 12 11:58:17 2004 +0200
@@ -718,7 +718,10 @@
     list := list asOrderedCollection.
     i := idx.
     moreLabels do:[:aLabel |
-        list add:aLabel beforeIndex:i. i := i + 1.
+        |l|
+
+        l := self labelWithoutDoubleAmpersands:aLabel.
+        list add:l beforeIndex:i. i := i + 1.
     ].
 
     selectors := (selectors ? #()) asOrderedCollection.
@@ -924,6 +927,7 @@
             ifTrue:[l := resources string:aLabel]
             ifFalse:[l := aLabel].
 
+        l := self labelWithoutDoubleAmpersands:l.
         list add:l beforeIndex:i. i := i + 1.
     ].
 
@@ -1355,6 +1359,7 @@
     ] ifFalse:[
         l := text copy
     ].
+    l := l collect:[:s | self labelWithoutDoubleAmpersands:s].
 "/    self list:l 
     self setList:l expandTabs:false.
     nItems := list size.
@@ -2359,6 +2364,11 @@
     ^ false.
 !
 
+labelWithoutDoubleAmpersands:label
+    (label includesString:'&&') ifFalse:[ ^ label].
+    ^ label replString:'&&' withString:'&'    
+!
+
 performSelectedAction
     |theSelector theAction isCheck checkOn val idx didItHere|
 
@@ -3084,5 +3094,5 @@
 !MenuView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.147 2004-04-02 18:04:24 werner Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.148 2004-05-12 09:58:17 cg Exp $'
 ! !