MenuView.st
changeset 3323 ce80842d41e0
parent 3294 a3266e46b191
child 3464 1cbe515ac960
--- a/MenuView.st	Mon Aug 07 15:47:11 2006 +0200
+++ b/MenuView.st	Tue Aug 08 15:59:59 2006 +0200
@@ -1521,7 +1521,7 @@
     "/ this is somewhat complicated: we have the symbolic key at hand,
     "/ but want to show the untranslated (inverse keyBoardMapped) key & modifier
     "/
-    s := self shortKeyStringFor:aSymbolicKey.
+    s := device shortKeyStringFor:aSymbolicKey.
     s isNil ifTrue:[^ self].
 
     l := self visibleLineToAbsoluteLine:visLineNr.
@@ -1550,8 +1550,8 @@
 
     self drawLine:s fromX:x inVisible:visLineNr with:fg and:bg
 
-    "Created: 28.2.1996 / 18:48:05 / cg"
-    "Modified: 2.3.1996 / 16:24:13 / cg"
+    "Created: / 28-02-1996 / 18:48:05 / cg"
+    "Modified: / 08-08-2006 / 15:47:11 / cg"
 !
 
 drawCheckLine:line inVisibleLine:visLineNr with:fg and:bg
@@ -2556,30 +2556,30 @@
 
     maxShortKeyStringLen isNil ifTrue:[
 
-	shortKeys isNil ifTrue:[
-	    maxShortKeyStringLen := 0
-	] ifFalse:[
-	    maxShortKeyStringLen := shortKeys 
-					inject:0 
-					into:[:maxSoFar :thisKey | |short|
-
-						thisKey isNil ifTrue:[
-						    maxSoFar
-						] ifFalse:[
-						    short := self shortKeyStringFor:thisKey.
-						    short isNil ifTrue:[
-							maxSoFar
-						    ] ifFalse:[
-							maxSoFar max:(font widthOf:short)
-						    ]
-						]
-					     ]
-	].
+        shortKeys isNil ifTrue:[
+            maxShortKeyStringLen := 0
+        ] ifFalse:[
+            maxShortKeyStringLen := shortKeys 
+                                        inject:0 
+                                        into:[:maxSoFar :thisKey | |short|
+
+                                                thisKey isNil ifTrue:[
+                                                    maxSoFar
+                                                ] ifFalse:[
+                                                    short := device shortKeyStringFor:thisKey.
+                                                    short isNil ifTrue:[
+                                                        maxSoFar
+                                                    ] ifFalse:[
+                                                        maxSoFar max:(font widthOf:short)
+                                                    ]
+                                                ]
+                                             ]
+        ].
     ].
     ^ maxShortKeyStringLen
 
-    "Created: 28.2.1996 / 16:30:09 / cg"
-    "Modified: 28.2.1996 / 18:26:37 / cg"
+    "Created: / 28-02-1996 / 16:30:09 / cg"
+    "Modified: / 08-08-2006 / 15:47:07 / cg"
 !
 
 shortKeyPrefixFor:aModifier
@@ -2607,37 +2607,6 @@
 
     "Created: 28.2.1996 / 16:32:17 / cg"
     "Modified: 20.3.1996 / 17:03:34 / cg"
-!
-
-shortKeyStringFor:aSymbolicKey
-    |untranslatedKey|
-
-    "/ this is somewhat complicated: we have the symbolic key at hand,
-    "/ but want to show the untranslated (inverse keyBoardMapped) key & modifier
-    "/
-
-    untranslatedKey := device keyboardMap keyAtValue:aSymbolicKey ifAbsent:aSymbolicKey.
-
-    "/
-    "/ some modifier-key combination ?
-    "/
-    (untranslatedKey startsWith:#Cmd) ifTrue:[
-	^ (self shortKeyPrefixFor:#Cmd) , (untranslatedKey copyFrom:4)
-    ].
-    (untranslatedKey startsWith:#Alt) ifTrue:[
-	^ (self shortKeyPrefixFor:#Alt) , (untranslatedKey copyFrom:4)
-    ].
-    (untranslatedKey startsWith:#Meta) ifTrue:[
-	^ (self shortKeyPrefixFor:#Meta) , (untranslatedKey copyFrom:5)
-    ].
-    (untranslatedKey startsWith:#Ctrl) ifTrue:[
-	^ (self shortKeyPrefixFor:#Ctrl) , (untranslatedKey copyFrom:5)
-    ].
-
-    ^ untranslatedKey
-
-    "Created: 28.2.1996 / 18:20:09 / cg"
-    "Modified: 20.3.1996 / 17:03:18 / cg"
 ! !
 
 !MenuView methodsFor:'redrawing'!
@@ -2932,5 +2901,5 @@
 !MenuView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.151 2006-03-29 08:55:42 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.152 2006-08-08 13:59:59 cg Exp $'
 ! !