'From Squeakland 3.8.5976 of 25 August 2004 [latest update: #388] on 17 February 2005 at 6:33:01 pm'! "Change Set: ItosanSuggestions1 Date: 17 February 2005 Author: yo Add more translations suggested by Ito-san."! !CodeHolder methodsFor: 'what to show' stamp: 'yo 2/17/2005 18:09'! offerWhatToShowMenu "Offer a menu governing what to show" | aMenu | Smalltalk isMorphic ifTrue: [aMenu := MenuMorph new defaultTarget: self. aMenu addTitle: 'What to show' translated. aMenu addStayUpItem. self addContentsTogglesTo: aMenu. aMenu popUpInWorld] ifFalse: [aMenu := CustomMenu new. self addContentsTogglesTo: aMenu. aMenu title: 'What to show' translated. aMenu invokeOn: self. self changed: #contents ]! ! !CodeHolder methodsFor: 'tiles' stamp: 'yo 2/17/2005 18:14'! addModelItemsToWindowMenu: aMenu "Add model-related item to the window menu" super addModelItemsToWindowMenu: aMenu. Smalltalk isMorphic ifTrue: [aMenu addLine. aMenu add: 'what to show...' translated target: self action: #offerWhatToShowMenu]! ! !Morph methodsFor: 'card in a stack' stamp: 'yo 2/17/2005 17:47'! insertAsStackBackground "I am not yet in a stack. Find a Stack that my reference point (center) overlaps, and insert me as a new background." | aMorph | self isStackBackground ifTrue: [^ Beeper beep]. "already in a stack. Must clear flags when remove." " self potentialEmbeddingTargets do: [:mm | No, force user to choose a stack. (mm respondsTo: #insertAsBackground:resize:) ifTrue: [ ^ mm insertAsBackground: self resize: false]]. " "None found, ask user" self inform: 'Please click on a Stack' translated. Sensor waitNoButton. aMorph _ self world chooseClickTarget. aMorph ifNil: [^ self]. (aMorph ownerThatIsA: StackMorph) insertAsBackground: self resize: false.! ! !Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 17:50'! exportAsBMP | fName | fName _ FillInTheBlank request:'Please enter the name' translated initialAnswer: self externalName,'.bmp'. fName isEmpty ifTrue:[^self]. self imageForm writeBMPfileNamed: fName.! ! !Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 17:50'! exportAsGIF | fName | fName _ FillInTheBlank request:'Please enter the name' translated initialAnswer: self externalName,'.gif'. fName isEmpty ifTrue:[^self]. GIFReadWriter putForm: self imageForm onFileNamed: fName.! ! !Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 17:51'! exportAsJPEG "Export the receiver's image as a JPEG" | fName | fName _ FillInTheBlank request: 'Please enter the name' translated initialAnswer: self externalName,'.jpeg'. fName isEmpty ifTrue: [^ self]. self imageForm writeJPEGfileNamed: fName! ! !Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 17:51'! exportAsPNG | fName | fName _ FillInTheBlank request:'Please enter the name' translated initialAnswer: self externalName,'.png'. fName isEmpty ifTrue:[^self]. PNGReadWriter putForm: self imageForm onFileNamed: fName.! ! !Morph methodsFor: 'menus' stamp: 'yo 2/17/2005 18:03'! printPSToFileNamed: aString "Ask the user for a filename and print this morph as postscript." | fileName rotateFlag psCanvasType psExtension | fileName := aString asFileName. psCanvasType _ PostscriptCanvas defaultCanvasType. psExtension _ psCanvasType defaultExtension. fileName := FillInTheBlank request: (String streamContents: [ :s | s nextPutAll: ('File name? ("{1}" will be added to end)' translated format: {psExtension})]) initialAnswer: fileName. fileName isEmpty ifTrue: [^ Beeper beep]. (fileName endsWith: psExtension) ifFalse: [fileName := fileName , psExtension]. rotateFlag := ((PopUpMenu labels: 'portrait (tall) landscape (wide)' translated) startUpWithCaption: 'Choose orientation...' translated) = 2. ((FileStream newFileNamed: fileName asFileName) converter: TextConverter defaultSystemConverter) nextPutAll: (psCanvasType morphAsPostscript: self rotated: rotateFlag); close! ! !ParagraphEditor methodsFor: 'menu messages' stamp: 'yo 2/17/2005 17:53'! changeAlignment | aList reply | aList _ #(leftFlush centered justified rightFlush). reply _ (SelectionMenu labelList: (aList collect: [:t | t translated]) selections: aList) startUp. reply ifNil:[^self]. self setAlignment: reply. paragraph composeAll. self recomputeSelection. self mvcRedisplay. ^ true! ! !SystemWindow methodsFor: 'label' stamp: 'yo 2/17/2005 17:52'! relabel | newLabel | newLabel _ FillInTheBlank request: 'New title for this window' translated initialAnswer: labelString. newLabel isEmpty ifTrue: [^self]. (model windowReqNewLabel: newLabel) ifTrue: [self setLabel: newLabel]! ! MultiString removeSelector: #asFileName!