[squeak-dev] The Trunk: Morphic-mt.1930.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Mar 10 14:21:23 UTC 2022
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1930.mcz
==================== Summary ====================
Name: Morphic-mt.1930
Author: mt
Time: 10 March 2022, 3:21:17.968178 pm
UUID: 88c981db-970f-3549-90f8-0645ec5bec66
Ancestors: Morphic-mt.1929
Locale clean-up. Complements Multilingual-mt.269 and System-mt.1318
=============== Diff against Morphic-mt.1929 ===============
Item was changed:
----- Method: HandMorph class>>localeChanged (in category 'class initialization') -----
localeChanged
+ self startUp: true.!
- self startUp.!
Item was removed:
- ----- Method: HandMorph class>>startUp (in category 'initialization') -----
- startUp
-
- self clearCompositionWindowManager.
- self clearInterpreters.
- !
Item was added:
+ ----- Method: HandMorph class>>startUp: (in category 'initialization') -----
+ startUp: resuming
+
+ resuming ifFalse: [^ self].
+ self clearCompositionWindowManager.
+ self clearInterpreters.
+ !
Item was changed:
----- Method: HandMorph>>keyboardInterpreter (in category 'multilingual') -----
keyboardInterpreter
+ ^keyboardInterpreter ifNil: [keyboardInterpreter := Locale currentPlatform inputInterpreter]!
- ^keyboardInterpreter ifNil: [keyboardInterpreter := LanguageEnvironment currentPlatform class defaultInputInterpreter]!
Item was changed:
----- Method: MorphicProject>>chooseNaturalLanguage (in category 'language') -----
chooseNaturalLanguage
"Put up a menu allowing the user to choose the natural language for the project"
| aMenu availableLanguages |
aMenu := MenuMorph new defaultTarget: self.
aMenu addTitle: 'choose language' translated.
aMenu lastItem setBalloonText: 'This controls the human language in which tiles should be viewed. It is potentially extensible to be a true localization mechanism, but initially it only works in the classic tile scripting system. Each project has its own private language choice' translated.
Preferences noviceMode
ifFalse:[aMenu addStayUpItem].
availableLanguages := NaturalLanguageTranslator availableLanguageLocaleIDs
sorted:[:x :y | x displayName < y displayName].
availableLanguages do:
[:localeID |
+ aMenu addUpdating: #stringForLanguageNameIs: target: Locale selector: #switchToID: argumentList: {localeID}].
- aMenu addUpdating: #stringForLanguageNameIs: target: Locale selector: #switchAndInstallFontToID: argumentList: {localeID}].
aMenu popUpInWorld
"Project current chooseNaturalLanguage"!
Item was changed:
----- Method: MorphicProject>>finalEnterActions: (in category 'enter') -----
finalEnterActions: leavingProject
"Perform the final actions necessary as the receiver project is entered"
| navigator armsLengthCmd navType thingsToUnhibernate |
"If this image has a global World variable, update it now"
Smalltalk globals at: #World
ifPresent: [ :w | Smalltalk globals at: #World put: world ].
world install.
world transferRemoteServerFrom: leavingProject world.
"(revertFlag | saveForRevert | forceRevert) ifFalse: [
(Preferences valueOfFlag: #projectsSentToDisk) ifTrue: [
self storeSomeSegment]]."
"Transfer event recorder to me."
leavingProject isMorphic ifTrue: [
leavingProject world pauseEventRecorder ifNotNil: [:rec |
rec resumeIn: world]].
world triggerOpeningScripts.
self initializeMenus.
self projectParameters
at: #projectsToBeDeleted
ifPresent: [ :projectsToBeDeleted |
self removeParameter: #projectsToBeDeleted.
projectsToBeDeleted do: [:each | each delete]].
+ Locale switchToID: self localeID.
- Locale switchAndInstallFontToID: self localeID.
thingsToUnhibernate := world valueOfProperty: #thingsToUnhibernate ifAbsent: [#()].
thingsToUnhibernate do: [:each | each unhibernate].
world removeProperty: #thingsToUnhibernate.
navType := ProjectNavigationMorph preferredNavigator.
armsLengthCmd := self parameterAt: #armsLengthCmd ifAbsent: [nil].
navigator := world findA: navType.
(Preferences classicNavigatorEnabled and: [Preferences showProjectNavigator and: [navigator isNil]]) ifTrue:
[(navigator := navType new)
bottomLeft: world bottomLeft;
openInWorld: world].
navigator notNil & armsLengthCmd notNil ifTrue:
[navigator color: Color lightBlue].
armsLengthCmd notNil ifTrue:
[Preferences showFlapsWhenPublishing
ifFalse:
[self flapsSuppressed: true.
navigator ifNotNil: [navigator visible: false]].
armsLengthCmd openInWorld: world].
world reformulateUpdatingMenus.
world presenter positionStandardPlayer.
self assureMainDockingBarPresenceMatchesPreference.
world repairEmbeddedWorlds.!
Item was changed:
----- Method: TheWorldMainDockingBar class>>initialize (in category 'class initialization') -----
initialize
"self initialize"
- Locale addLocalChangedListener: self.
self updateInstances.!
Item was changed:
----- Method: TheWorldMainDockingBar>>languageTranslatorsOn: (in category 'submenu - extras') -----
languageTranslatorsOn: menu
| availableLanguages |
availableLanguages := NaturalLanguageTranslator availableLanguageLocaleIDs
sorted:[:x :y | x displayName < y displayName].
availableLanguages do: [:localeID |
+ menu addUpdating: #stringForLanguageNameIs: target: Locale selector: #switchToID: argumentList: {localeID}].
- menu addUpdating: #stringForLanguageNameIs: target: Locale selector: #switchAndInstallFontToID: argumentList: {localeID}].
!
More information about the Squeak-dev
mailing list
|