--- a/CodeView.st Mon Dec 13 18:07:34 1993 +0100
+++ b/CodeView.st Thu Dec 16 12:00:50 1993 +0100
@@ -26,7 +26,7 @@
to the menu, and defines two actions: acceptAction to be performed for accept
and explainAction to be performed for explain.
-$Header: /cvs/stx/stx/libwidg/CodeView.st,v 1.4 1993-12-11 01:41:07 claus Exp $
+$Header: /cvs/stx/stx/libwidg/CodeView.st,v 1.5 1993-12-16 11:00:30 claus Exp $
written winter-89 by claus
'!
@@ -49,28 +49,17 @@
'copy'
'cut'
'paste'
- 'replace'
- '-'
- 'font'
- '-'
- 'search'
- 'goto'
- '-'
- 'indent'
- '-'
- 'save'
- 'print'
- " 'filein' "
'-'
'doIt'
'printIt'
'inspectIt'
'-'
- 'explain'
+ 'accept'
'-'
- 'accept').
+ 'others ...'
+ ).
- self middleButtonMenu:(PopUpMenu
+ self middleButtonMenu:(PopUpMenu
labels:labels
selectors:#(
"
@@ -79,31 +68,49 @@
again
nil
copySelection
- cut
- paste
- replace
- nil
- changeFont
- nil
- search
- gotoLine
- nil
- indent
- nil
- save
- print
- " fileItIn "
- nil
- doIt
- printIt
- inspectIt
- nil
- explain
- nil
- accept)
+ cut
+ paste
+ nil
+ doIt
+ printIt
+ inspectIt
+ nil
+ accept
+ nil
+ others
+ )
receiver:self
for:self).
+ middleButtonMenu subMenuAt:#others put:(PopUpMenu
+ labels:#(
+ 'search'
+ 'goto'
+ '-'
+ 'explain'
+ '-'
+ 'font'
+ '-'
+ 'indent'
+ '-'
+ 'save as ..'
+ 'print'
+ )
+ selectors:#(
+ search
+ gotoLine
+ nil
+ explain
+ nil
+ changeFont
+ nil
+ indent
+ nil
+ save
+ print
+ )
+ receiver:self
+ for:self).
! !
!CodeView methodsFor:'accessing'!
@@ -189,8 +196,8 @@
keyPress:key x:x y:y
"catch keyboard shortcut: control-a for accept"
- (key == #Cmda) ifTrue:[^ self accept].
- (key == #Cmde) ifTrue:[^ self explain].
+ (key == #Accept) ifTrue:[^ self accept].
+ (key == #Explain) ifTrue:[^ self explain].
(key == #Help) ifTrue:[^ self explain].
super keyPress:key x:x y:y
! !