'From Squeak3.2alpha of 3 October 2001 [latest update: #4629] on 19 December 2001 at 12:03:04 am'! "Change Set: miscIssues-sw Date: 18 December 2001 Author: Scott Wallace A few minor things... ¥ Fixes the bug that could generate an error when a vocabulary initialization was issued while in an mvc project (per Tim Rowledge bug report) ¥ Stops noting the creation of a new change set in the transcript. (per Tim Rowledge complaint) ¥ Removes an annoying 'nothing changed' informer. ¥ Reformats Craig's PasteUpMorph.viewBox:, whose formatting had become somehow mangled, as per Mike Rutenberg recommendation. ¥ Fixes the bug that appeared when you tried to return from an mvc project to a morphic project that had a menu open in it"! !ChangeSorter class methodsFor: 'adding' stamp: 'sw 12/18/2001 23:27'! newChangeSet "Prompt the user for a name, and establish a new change set of that name (if ok), making it the current changeset. Return nil of not ok, else return the actual changeset." | newName newSet | newName _ FillInTheBlank request: 'Please name the new change set:' initialAnswer: ChangeSet defaultName. newName isEmptyOrNil ifTrue: [^ nil]. newSet _ self basicNewChangeSet: newName. newSet ifNotNil: [Smalltalk newChanges: newSet]. ^ newSet! ! !MenuMorph methodsFor: 'drawing' stamp: 'sw 12/18/2001 23:45'! drawOn: aCanvas "Draw the menu. Add keyboard-focus feedback if appropriate" super drawOn: aCanvas. (ActiveHand notNil and: [ActiveHand keyboardFocus == self] and: [self rootMenu hasProperty: #hasUsedKeyboard]) ifTrue: [aCanvas frameAndFillRectangle: self innerBounds fillColor: Color transparent borderWidth: 1 borderColor: Preferences keyboardFocusColor]! ! !ObjectWithDocumentation methodsFor: 'translation' stamp: 'sw 12/18/2001 22:14'! translatedToPrevailingLanguage "Answer an ElementTranslation object in the prevailing natural language, or, if none found, in English" | prevailingLanguage fallback elSym el wrd doc | prevailingLanguage _ self currentWorld currentNaturalLanguage. elSym _ self elementSymbol. ^ naturalLanguageTranslations isEmptyOrNil ifFalse: [naturalLanguageTranslations do: [:aTranslation | aTranslation language == prevailingLanguage ifTrue: [^ aTranslation]. aTranslation language == #English ifTrue: [fallback _ aTranslation]]. fallback ifNil: [ElementCategory new categoryName: #none]] ifTrue: [(el _ self elementSymbol) ifNotNil: [((el beginsWith: 'get') and: [elSym size > 3]) ifTrue: [wrd _ (elSym copyFrom: 4 to: elSym size) withFirstCharacterDownshifted. doc _ 'get value of ', elSym] ifFalse: [((elSym beginsWith: 'set') and: [elSym size > 4]) ifTrue: [wrd _ (elSym copyFrom: 4 to: elSym size - 1) withFirstCharacterDownshifted. doc _ 'set value of ', elSym] ifFalse: [wrd _ ScriptingSystem wordingForOperator: elSym. doc _ nil]]]. ^ ElementTranslation new wording: wrd helpMessage: doc language: #English]! ! !PasteUpMorph methodsFor: 'project state' stamp: 'crl 11/5/2001 22:57'! viewBox: newViewBox "I am now displayed within newViewBox; react." (self viewBox == nil or: [self viewBox extent ~= newViewBox extent]) ifTrue: [worldState canvas: nil]. worldState viewBox: newViewBox. super position: newViewBox topLeft. fullBounds _ bounds _ newViewBox. "Paragraph problem workaround; clear selections to avoid screen droppings." self flag: #arNote. "Probably unnecessary" worldState handsDo: [:hand | hand releaseKeyboardFocus]. self fullRepaintNeeded! !