[squeak-dev] The Trunk: System-mt.798.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Feb 18 14:41:41 UTC 2016


Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.798.mcz

==================== Summary ====================

Name: System-mt.798
Author: mt
Time: 18 February 2016, 3:41:11.347199 pm
UUID: ab53c315-2eb1-4471-9790-e6ab6ca63001
Ancestors: System-mt.797

Clear up final enter/exit actions for projects. Move most locale update code to Morphic project

=============== Diff against System-mt.797 ===============

Item was changed:
  ----- Method: Project>>enter:revert:saveForRevert: (in category 'enter') -----
  enter: returningFlag revert: revertFlag saveForRevert: saveForRevert
  	"Install my ChangeSet, Transcript, and scheduled views as current globals. If returningFlag is true, we will return to the project from whence the current project was entered; don't change its previousProject link in this case.
  	If saveForRevert is true, save the ImageSegment of the project being left.
  	If revertFlag is true, make stubs for the world of the project being left.
  	If revertWithoutAsking is true in the project being left, then always revert."
  
  	| showZoom recorderOrNil old forceRevert response seg |
  
  	self isIncompletelyLoaded ifTrue:
  		[^self loadFromServer: true	"try to get a fresh copy"].
  	self isCurrentProject ifTrue: [^ self].
  	"Check the guards"
  	guards ifNotNil:
  		[guards := guards reject: [:obj | obj isNil].
  		guards do: [:obj | obj okayToEnterProject ifFalse: [^ self]]].
  	CurrentProject world triggerEvent: #aboutToLeaveWorld.
  	forceRevert := false.
  	CurrentProject rawParameters 
  		ifNil: [revertFlag ifTrue: [^ self inform: 'nothing to revert to' translated]]
  		ifNotNil: [saveForRevert ifFalse: [
  				forceRevert := CurrentProject projectParameters 
  								at: #revertWithoutAsking ifAbsent: [false]]].
  	forceRevert not & revertFlag ifTrue: [
  		response := (UIManager default chooseFrom: {
  			'Revert to saved version' translated.
  			'Cancel' translated.
  		} title: 'Are you sure you want to destroy this Project\ and revert to an older version?\\(From the parent project, click on this project''s thumbnail.)' translated withCRs) = 1.
  		response ifFalse: [^ self]].
  
  	revertFlag | forceRevert 
  		ifTrue: [seg := CurrentProject projectParameters at: #revertToMe ifAbsent: [
  					^ self inform: 'nothing to revert to' translated]]
  		ifFalse: [
- 			CurrentProject finalExitActions.
  			CurrentProject makeThumbnail.
  			returningFlag == #specialReturn
  				ifTrue:
  					[ProjectHistory forget: CurrentProject.		"this guy is irrelevant"
  					Project forget: CurrentProject]
  				ifFalse:
  					[ProjectHistory remember: CurrentProject]].
  
  	(revertFlag | saveForRevert | forceRevert) ifFalse:
  		[(Preferences valueOfFlag: #projectsSentToDisk) ifTrue:
  			[self storeToMakeRoom]].
  
  	CurrentProject abortResourceLoading.
  	CurrentProject triggerClosingScripts.
  	CurrentProject saveProjectPreferences.
  
  	"Update the display depth and make a thumbnail of the current project"
  	CurrentProject displayDepth: Display depth.
  	old := CurrentProject.		"for later"
  
  	"Show the project transition.
  	Note: The project zoom is run in the context of the old project,
  		so that eventual errors can be handled accordingly"
  	displayDepth == nil ifTrue: [displayDepth := Display depth].
  	self installNewDisplay: Display extent depth: displayDepth.
  	(showZoom := self showZoom) ifTrue: [
  		self displayZoom: CurrentProject parent ~~ self].
  
  	CurrentProject pauseSoundPlayers.
  
  	returningFlag == #specialReturn ifTrue: [
  		old removeChangeSetIfPossible.	"keep this stuff from accumulating"
  		nextProject := nil
  	] ifFalse: [
  		returningFlag
  			ifTrue: [nextProject := CurrentProject]
  			ifFalse: [previousProject := CurrentProject].
  	].
  
+ 	recorderOrNil := old pauseEventRecorder.
+ 
  	CurrentProject saveState.
+ 	CurrentProject finalExitActions.	
+ 	
+ 	"Now I am the current project."
  	CurrentProject := self.
  	self installProjectPreferences.
  	ChangeSet  newChanges: changeSet.
  	TranscriptStream newTranscript: transcript.
  	Sensor flushKeyboard.
- 	recorderOrNil := old pauseEventRecorder.
  	ProjectHistory remember: CurrentProject.
  	self setWorldForEnterFrom: old recorder: recorderOrNil.
  
  	saveForRevert ifTrue: [
  		Smalltalk garbageCollect.	"let go of pointers"
  		old storeSegment.
  		"result :=" old world isInMemory 
  			ifTrue: ['Can''t seem to write the project.']
  			ifFalse: [old projectParameters at: #revertToMe put: 
  					old world xxxSegment clone].
  				'Project written.'].
  			"original is for coming back in and continuing."
  
  	revertFlag | forceRevert ifTrue: [
  		seg clone revert].	"non-cloned one is for reverting again later"
  	self removeParameter: #exportState.
  
  	"Complete the enter: by launching a new process"
+ 	self finalEnterActions.
  	self scheduleProcessForEnter: showZoom
  !

Item was added:
+ ----- Method: Project>>finalEnterActions (in category 'enter') -----
+ finalEnterActions
+ !

Item was changed:
  ----- Method: Project>>updateLocaleDependents (in category 'language') -----
  updateLocaleDependents
  	"Set the project's natural language as indicated"
  
+ 	LanguageEnvironment localeChanged.!
- 	ActiveWorld allTileScriptingElements do: [:viewerOrScriptor |
- 			viewerOrScriptor localeChanged].
- 
- 	Flaps disableGlobalFlaps: false.
- 	Preferences eToyFriendly
- 		ifTrue: [
- 			Flaps addAndEnableEToyFlaps.
- 			ActiveWorld addGlobalFlaps]
- 		ifFalse: [Flaps enableGlobalFlaps].
- 
- 	(Project current isFlapIDEnabled: 'Navigator' translated)
- 		ifFalse: [Flaps enableDisableGlobalFlapWithID: 'Navigator' translated].
- 
- 	ScrapBook default emptyScrapBook.
- 	MenuIcons initializeTranslations.
- 
- 	LanguageEnvironment localeChanged.
- 
- 	"self setFlaps.
- 	self setPaletteFor: aLanguageSymbol."
- !

Item was changed:
  ----- Method: SmalltalkImage>>isMorphic (in category 'snapshot and quit') -----
  isMorphic
+        
+ 	^ Project current isMorphic!
-         "Answer true if the user interface is running in Morphic rathern than 
-         MVC.  By convention the gloabl variable World is set to nil when MVC is 
-         running.  ScheduledControllers could be set to nil when Morphic is 
-         running, but this symmetry is not yet in effect."
- 
-         ^ World ~~ nil "or: [RequestCurrentWorldNotification signal notNil]"!



More information about the Squeak-dev mailing list