MenuView.st
changeset 1919 7752e8980de5
parent 1870 9bce9ea89db3
child 1960 ead74f666236
--- a/MenuView.st	Thu May 27 13:41:59 1999 +0200
+++ b/MenuView.st	Mon May 31 13:06:11 1999 +0200
@@ -1500,7 +1500,8 @@
         ((self isCheckItem:lineString) 
         and:[self drawCheckLine:lineString inVisibleLine:visLineNr with:fg and:bg])
         ifFalse:[
-            super drawLine:lineString inVisible:visLineNr with:fg and:bg.
+            l := lineString replString:'\\' withString:'\'.
+            super drawLine:l inVisible:visLineNr with:fg and:bg.
         ].
     ].
 
@@ -1513,7 +1514,7 @@
         self drawAccelerator:key inVisibleLine:visLineNr with:fg and:bg
     ]
 
-    "Modified: / 19.5.1998 / 21:59:07 / cg"
+    "Modified: / 31.5.1999 / 12:35:48 / cg"
 !
 
 drawVisibleLineSelected:visLineNr with:fg and:bg
@@ -1994,14 +1995,28 @@
 !
 
 isCheckItem:line
+    "return true if \c, \b or \t is contained in the line arg.
+     Care for '\\'."
+
+    |idx|
+
     line notNil ifTrue:[
-	(line includesString:'\c') ifTrue:[^ true].
-	(line includesString:'\b') ifTrue:[^ true].
-	(line includesString:'\t')ifTrue:[^ true].
+        idx := 1.
+        [idx ~~ 0] whileTrue:[
+            idx := line indexOf:$\ startingAt:idx.
+            (idx ~~ 0) ifTrue:[
+                idx < line size ifTrue:[
+                    ('cbt' includes:(line at:(idx+1))) ifTrue:[
+                        ^ true
+                    ].
+                ].
+                idx := idx + 2.
+            ].
+        ].
     ].
     ^ false.
 
-    "Modified: 26.2.1996 / 23:16:12 / cg"
+    "Modified: / 31.5.1999 / 12:59:07 / cg"
 !
 
 isGraphicItem:line
@@ -2720,5 +2735,5 @@
 !MenuView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.121 1999-04-24 14:37:19 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.122 1999-05-31 11:06:11 cg Exp $'
 ! !