[squeak-dev] The Trunk: Morphic-cmm.551.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jun 22 01:21:58 UTC 2011


Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.551.mcz

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

Name: Morphic-cmm.551
Author: cmm
Time: 21 June 2011, 8:20:55.16 pm
UUID: b16faf40-0f35-435b-aa1b-ac5eadc6661b
Ancestors: Morphic-cmm.550

- Reverted LineMorph class>>from:to:color:width: - PolygonMorph can cover all kinds of polygons, including lines..
- Full-screen toggle option has been moved out from the menu (from multiple places) and onto the bar directly, just to the right of the clock.  For one-click access (instead of two).
- Changed balloon-help nomenclature of +expand to remove "full-screen", since it is not truly full-screen, just expanded from its current state.

=============== Diff against Morphic-cmm.550 ===============

Item was changed:
  ----- Method: LineMorph class>>from:to:color:width: (in category 'instance creation') -----
  from: startPoint to: endPoint color: lineColor width: lineWidth
  
+ 	^ PolygonMorph vertices: {startPoint. endPoint}
- 	^ self vertices: {startPoint. endPoint}
  			color: Color black borderWidth: lineWidth borderColor: lineColor!

Item was changed:
  ----- Method: SystemWindow>>collapseOrExpand (in category 'resize/collapse') -----
  collapseOrExpand
  	"Collapse or expand the window, depending on existing state"
  	| cf |
  	isCollapsed
  		ifTrue: 
  			["Expand -- restore panes to morphics structure"
  			isCollapsed := false.
  			self activate.  "Bring to frint first"
  			Preferences collapseWindowsInPlace
  				ifTrue: 
  					[fullFrame := fullFrame align: fullFrame topLeft with: self getBoundsWithFlex topLeft]
  				ifFalse:
  					[collapsedFrame := self getBoundsWithFlex].
+ 			collapseBox ifNotNil: [collapseBox setBalloonText: 'collapse this window' translated].
- 			collapseBox ifNotNil: [collapseBox setBalloonText: 'collapse this window'].
  			self setBoundsWithFlex: fullFrame.
  			paneMorphs reverseDo: 
  					[:m |  self addMorph: m unlock.
  					self world startSteppingSubmorphsOf: m].
  			self addPaneSplitters]
  		ifFalse: 
  			["Collapse -- remove panes from morphics structure"
  			isCollapsed := true.
  			fullFrame := self getBoundsWithFlex.
  			"First save latest fullFrame"
  			paneMorphs do: [:m | m delete; releaseCachedState].
  			self removePaneSplitters.
  			self removeCornerGrips.
  			model modelSleep.
  			cf := self getCollapsedFrame.
  			(collapsedFrame isNil and: [Preferences collapseWindowsInPlace not]) ifTrue:
  				[collapsedFrame := cf].
  			self setBoundsWithFlex: cf.
+ 			collapseBox ifNotNil: [collapseBox setBalloonText: 'expand this window' translated ].
+ 			expandBox ifNotNil: [expandBox setBalloonText: 'expand this window' translated ].
- 			collapseBox ifNotNil: [collapseBox setBalloonText: 'expand this window'].
- 			expandBox ifNotNil: [expandBox setBalloonText: 'expand to full screen'].
  			self sendToBack].
  	self layoutChanged!

Item was changed:
  ----- Method: SystemWindow>>contractToOriginalSize (in category 'resize/collapse') -----
  contractToOriginalSize
  	self bounds: self unexpandedFrame.
  	self unexpandedFrame: nil.
+ 	expandBox ifNotNil: [expandBox setBalloonText: 'expand this window' translated].!
- 	expandBox ifNotNil: [expandBox setBalloonText: 'expand to full screen' translated].!

Item was changed:
  ----- Method: SystemWindow>>createExpandBox (in category 'initialization') -----
  createExpandBox
  	^ (self createBox: self class expandBoxImage)
  		actionSelector: #expandBoxHit;
+ 		setBalloonText: 'expand this window' translated!
- 		setBalloonText: 'expand to full screen' translated!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>extrasMenuOn: (in category 'submenu - extras') -----
  extrasMenuOn: aDockingBar 
  
  	aDockingBar addItem: [ :it|
  		it 	contents: 'Extras' translated;
  			addSubMenu: [:menu|
  				menu addItem:[:item|
  					item
  						contents: 'Recover Changes' translated;
  						help: 'Recover changes after a crash' translated;
  						icon: MenuIcons smallHelpIcon;
  						target: ChangeList;
  						selector: #browseRecentLog].
  				menu addLine.
  				menu addItem:[:item|
  					item
  						contents: 'Window Colors' translated;
  						help: 'Changes the window color scheme' translated;
  						addSubMenu:[:submenu| self windowColorsOn: submenu]].
  				menu addItem:[:item|
  					item
  						contents: 'Set Author Initials' translated;
  						help: 'Sets the author initials' translated;
  						target: Utilities;
  						selector: #setAuthorInitials].
  				menu addItem:[:item|
  					item
  						contents: 'Restore Display (r)' translated;
  						help: 'Redraws the entire display' translated;
  						target: World;
  						selector: #restoreMorphicDisplay].
  				menu addItem:[:item|
  					item
  						contents: 'Rebuild Menus' translated;
  						help: 'Rebuilds the menu bar' translated;
  						target: TheWorldMainDockingBar;
  						selector: #updateInstances].
- 				menu addItem:[:item|
- 					item
- 						contents: 'Toggle Fullscreen' translated;
- 						help: 'Switches fullscreen mode on and off' translated;
- 						target: Project current;
- 						selector: #toggleFullScreen].
  				menu addLine.
  				menu addItem:[:item|
  					item
  						contents: 'Start Profiler' translated;
  						help: 'Starts the profiler' translated;
  						target: self;
  						selector: #startMessageTally].
  				menu addItem:[:item|
  					item
  						contents: 'Collect Garbage' translated;
  						help: 'Run the garbage collector and report space usage' translated;
  						target: Utilities;
  						selector: #garbageCollectAndReport].
  				menu addItem:[:item|
  					item
  						contents: 'Purge Undo Records' translated;
  						help: 'Save space by removing all the undo information remembered in all projects' translated;
  						target: CommandHistory;
  						selector: #resetAllHistory].
  				menu addItem:[:item|
  					item
  						contents: 'VM statistics' translated;
  						help: 'Virtual Machine information' translated;
  						target: self;
  						selector: #vmStatistics].
  				menu addLine.
  				menu addItem:[:item|
  					item
  						contents: 'Graphical Imports' translated;
  						help: 'View the global repository called ImageImports; you can easily import external graphics into ImageImports via the FileList' translated;
  						target: (Imports default);
  						selector: #viewImages].
  				menu addItem:[:item|
  					item
  						contents: 'Standard Graphics Library' translated;
  						help: 'Lets you view and change the system''s standard library of graphics' translated;
  						target: ScriptingSystem;
  						selector: #inspectFormDictionary].
  				menu addItem:[:item|
  					item
  						contents: 'Annotation Setup' translated;
  						help: 'Click here to get a little window that will allow you to specify which types of annotations, in which order, you wish to see in the annotation panes of browsers and other tools' translated;
  						target: Preferences;
  						selector: #editAnnotations].
  				menu addItem:[:item|
  					item
  						contents: 'Browse My Changes' translated;
  						help: 'Browse all of my changes since the last time #condenseSources was run.' translated;
  						target: SystemNavigation new;
  						selector: #browseMyChanges].
  			] ]!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>projectsMenuOn: (in category 'construction') -----
  projectsMenuOn: aDockingBar
  
  	aDockingBar addItem: [ :item |
  		item
  			contents: 'Projects' translated;
  			addSubMenu: [ :menu | 
  				self
  					newProjectMenuItemOn: menu;
  					saveProjectMenuItemOn: menu;
  					loadProjectMenuItemOn: menu;
  					previousProjectMenuItemOn: menu;
+ 					jumpToProjectMenuItemOn: menu ] ]
- 					jumpToProjectMenuItemOn: menu;
- 					toggleFullScreenMenuItemOn: menu ] ]
  !

Item was removed:
- ----- Method: TheWorldMainDockingBar>>toggleFullScreenMenuItemOn: (in category 'submenu - projects') -----
- toggleFullScreenMenuItemOn: menu
- 
- 	menu addItem: [ :item |
- 		item
- 			contents: 'Toggle Full Screen' translated;
- 			help: 'Switch back and forth from full screen mode' translated;
- 			icon: MenuIcons smallFullscreenOnIcon;
- 			target: Project current;
- 			selector: #toggleFullScreen ]!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>toggleFullScreenOn: (in category 'right side') -----
+ toggleFullScreenOn: aDockingBar 
+ 	| toggleMorph |
+ 	toggleMorph := (SketchMorph withForm: MenuIcons smallFullscreenOffIcon) setBalloonText: 'toggle full screen mode' translated;
+ 				
+ 				on: #mouseDown
+ 				send: #value
+ 				to:
+ 					[ Project current toggleFullScreen. 
+ 					toggleMorph form: MenuIcons smallFullscreenOffIcon ] ;
- toggleFullScreenOn: aDockingBar
  
+ 				on: #mouseEnter
+ 				send: #value
+ 				to: [toggleMorph form: MenuIcons smallFullscreenOnIcon];
+ 				
+ 				on: #mouseLeave
+ 				send: #value
+ 				to: [toggleMorph form: MenuIcons smallFullscreenOffIcon];
+ 				 yourself.
+ 	aDockingBar addMorphBack: toggleMorph!
- 	| toggleMorph toggleColor toggleColorOver |
- 	toggleColor := Color "transparent" lightOrange.
- 	toggleColorOver := Color orange.
- 	(toggleMorph := Morph new)
- 		extent: 18 @ 18; flag: #rhi; "*** 18 = MAGIC NUMBER? ***"
- 		borderWidth: 0;
- 		color: toggleColor;
- 		setBalloonText: 'toggle full screen mode';
- 		on: #mouseDown send: #value to: [Project current toggleFullScreen];
- 		on: #mouseEnter send: #value to: [toggleMorph color: toggleColorOver];
- 		on: #mouseLeave send: #value to: [toggleMorph color: toggleColor].
- 	aDockingBar addMorphBack: toggleMorph.!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>windowMenuFor:on: (in category 'submenu - windows') -----
  windowMenuFor: window on: menu
- 
  	menu 
  		addItem: [ :item |
  			item
+ 				contents: 'Close' translated ;
- 				contents: 'Close';
  				target: window;
  				selector: #delete ];
  		addItem: [ :item |
  			item
+ 				contents: 'Close all like this' translated ;
- 				contents: 'Close all like this';
  				target: self;
  				selector: #closeAllWindowsLike:;
  				arguments: { window } ];
  		addItem: [ :item |
  			item
+ 				contents: 'Close all but this' translated ;
- 				contents: 'Close all but this';
  				target: self;
  				selector: #closeAllWindowsBut:;
  				arguments: { window } ];
  		addItem: [ :item |
  			item 
+ 				contents: 'Expand or Contract' translated ;
- 				contents: 'Toggle Full Screen';
  				target: window;
  				selector: #expandBoxHit ]!




More information about the Squeak-dev mailing list