'From etoys3.0 of 28 February 2008 [latest update: #2160] on 3 November 2008 at 10:11:29 pm'! "Change Set: arrowsOnLangChg-sw Date: 3 November 2008 Author: Scott Wallace Fix for TRAC 8928 - Switching language loses arrows."! !Project methodsFor: 'language' stamp: 'sw 11/3/2008 22:07'! updateLocaleDependentsWithPreviousSupplies: aCollection gently: gentlyFlag "Set the project's natural language as indicated" | morphs scriptEditors | gentlyFlag ifTrue: [ LanguageEnvironment localeChangedGently. ] ifFalse: [ LanguageEnvironment localeChanged. ]. morphs := IdentitySet new: 400. ActiveWorld allMorphsAndBookPagesInto: morphs. scriptEditors := morphs select: [:m | (m isKindOf: ScriptEditorMorph) and: [m topEditor == m]]. morphs := morphs copyWithoutAll: scriptEditors. morphs do: [:morph | morph isTileScriptingElement ifTrue: [morph localeChanged]. (morph isKindOf: TextMorph) ifTrue: [morph localeChanged]. "NB: only those marked as translatable will be translated..." morph class == ObjectsTool ifTrue: [morph localeChanged]]. scriptEditors do: [:m | m localeChanged]. Flaps disableGlobalFlaps: false. Preferences sugarNavigator ifTrue: [Flaps addAndEnableEToyFlapsWithPreviousEntries: aCollection. ActiveWorld addGlobalFlaps] ifFalse: [Preferences eToyFriendly ifTrue: [Flaps addAndEnableEToyFlaps. ActiveWorld addGlobalFlaps] ifFalse: [Flaps enableGlobalFlaps]]. (Project current isFlapIDEnabled: 'Navigator' translated) ifFalse: [Flaps enableDisableGlobalFlapWithID: 'Navigator' translated]. ParagraphEditor initializeTextEditorMenus. MenuIcons initializeTranslations. #(PartsBin ParagraphEditor BitEditor FormEditor StandardSystemController) do: [ :key | Smalltalk at: key ifPresent: [ :class | class initialize ]]. ActiveWorld reformulateUpdatingMenus. "self setFlaps. self setPaletteFor: aLanguageSymbol." ! ! !ScriptEditorMorph methodsFor: 'e-toy support' stamp: 'sw 11/3/2008 22:09'! localeChanged "Update myself to reflect the change in locale" self fixLayout. self == self topEditor ifTrue: "nested script-editors handled by the topmost." [self fixUpCarets]! ! !TileMorph methodsFor: 'arrows' stamp: 'sw 11/3/2008 15:04'! addRetractArrow "If it's appropriate, add the retract arrow. Only called when suffixArrow is already present and in submorph tree." self couldRetract ifNil: [^ self rescindRetractArrow]. retractArrow ifNil: [retractArrow _ ImageMorph new image: RetractPicture]. self addMorph: retractArrow inFrontOf: suffixArrow. fullBounds _ nil. self extent: self fullBounds extent! !