[squeak-dev] The Inbox: Morphic-dtl.523.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Mar 4 23:37:49 UTC 2011


A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-dtl.523.mcz

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

Name: Morphic-dtl.523
Author: dtl
Time: 4 March 2011, 1:52:07.786 pm
UUID: 82d08df8-652b-45c9-b846-d8ae1d3df66c
Ancestors: Morphic-dtl.522

Support for SimpleMorphic coexisting with Morphic in a Squeak image.

MorphicProject initializes editor classes on project entry, allowing menus and actions to be reinitialized if another type of Morphic project has modified them.

If SimpleMorphic is present in the image, provide it as an menu option for new projects.

=============== Diff against Morphic-dtl.522 ===============

Item was changed:
  ----- Method: MorphicProject>>finalEnterActions (in category 'enter') -----
  finalEnterActions
  	"Perform the final actions necessary as the receiver project is entered"
  
  	| navigator armsLengthCmd navType thingsToUnhibernate |
  
+ 	self initializeMenus.
  	self projectParameters 
  		at: #projectsToBeDeleted 
  		ifPresent: [ :projectsToBeDeleted |
  			self removeParameter: #projectsToBeDeleted.
  			projectsToBeDeleted do: [ :each | 
  				Project deletingProject: each.
  				each removeChangeSetIfPossible]].
  
  	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.
  
  	WorldState addDeferredUIMessage: [self startResourceLoading].!

Item was added:
+ ----- Method: MorphicProject>>initializeMenus (in category 'enter') -----
+ initializeMenus
+ 	"Menu setting for these classes may have have been modified by another
+ 	Morphic project, e.g. SimpleMorphic. Ensure that they are restored to the
+ 	expected menus."
+ 
+ 	TextEditor initialize.
+ 	SmalltalkEditor initialize!

Item was changed:
  ----- Method: TheWorldMenu>>openMenu (in category 'construction') -----
  openMenu
  	"Build the open window menu for the world."
  
  	| menu |
  	menu := self menu: 'open...'.
  	menu defaultTarget: ToolSet default.
  	menu addList: ToolSet menuItems.
  	menu defaultTarget: self.
  	self fillIn: menu from: {
  		nil.
  		{'file...' . { self . #openFileDirectly} . 'Lets you open a window on a single file'}.
  		{'transcript (t)' . {self . #openTranscript}. 'A window used to report messages sent to Transcript' }.
  		"{'inner world' . { WorldWindow . #test1} }."
  		nil.
  	}.
  	self fillIn: menu from: self class registeredOpenCommands.
  	menu addLine.
  
  	self mvcProjectsAllowed ifTrue:
  		[self fillIn: menu from: { {'mvc project' . {self. #openMVCProject} . 'Creates a new project of the classic "mvc" style'} }].
  
+ 	self fillIn: menu from: { 
- 	^ self fillIn: menu from: { 
  		{'morphic project' . {self. #openMorphicProject} . 'Creates a new morphic project'}.
+ 	}.
+ 	Smalltalk at: #SMxMorphicProject ifPresent: [:p |
+ 		self fillIn: menu from: { 
+ 			{ 'simple morphic project' . { self . #openSMxMorphicProject } . 'Creates a new simple morphic project' }.
+ 		}
+ 	].
+ 	^menu
+ !
- 	}.!

Item was changed:
  ----- Method: TheWorldMenu>>projectMenu (in category 'construction') -----
  projectMenu
  	"Build the project menu for the world."
  	| menu |
  
  	self flag: #bob0302.
  
  	menu := self menu: 'projects...'.
  	self fillIn: menu from: { 
  		{ 'save on server (also makes a local copy)' . { #myProject . #storeOnServer } }.
  		{ 'save to a different server' . { #myProject . #saveAs } }.
  		{ 'save project on local file only' . { #myWorld . #saveOnFile } }.
  		{ 'see if server version is more recent...' . { #myProject . #loadFromServer } }.
  		{ 'load project from file...' . { self . #loadProject } }.
  		nil.
  	}.
  
  	self mvcProjectsAllowed ifTrue: [
  		self fillIn: menu from: {
  			{ 'create new mvc project'. { self . #openMVCProject } }.
  		}
  	].
  	self fillIn: menu from: { 
  		{ 'create new morphic project' . { self . #openMorphicProject } }.
+ 	}.
+ 	Smalltalk at: #SMxMorphicProject ifPresent: [:p |
+ 		self fillIn: menu from: { 
+ 			{ 'create new simple morphic project' . { self . #openSMxMorphicProject } }.
+ 		}
+ 	].
+ 	self fillIn: menu from: { 
  		nil.
  		{ 'go to previous project' . { Project . #returnToPreviousProject } }.
  		{ 'go to next project' . { Project . #advanceToNextProject } }.
  		{ 'jump to project...' . { #myWorld . #jumpToProject } }.
  	}.
  	Preferences simpleMenus ifFalse: [
  		self fillIn: menu from: { 
  			nil.
  			{ 'save for future revert' . { #myProject . #saveForRevert } }.
  			{ 'revert to saved copy' . { #myProject . #revert } }.
  		}.
  	].
  
  	^ menu!




More information about the Squeak-dev mailing list