[squeak-dev] The Trunk: Morphic-mt.1264.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Aug 12 08:26:53 UTC 2016


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

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

Name: Morphic-mt.1264
Author: mt
Time: 12 August 2016, 10:26:01.261343 am
UUID: 0c9f94c5-23b0-d44d-963c-4b70b7a58be9
Ancestors: Morphic-mt.1263

Use #sorted: instead of #sortBy: to better indicate that it is a copy and not an in-place update like #sort:.

=============== Diff against Morphic-mt.1263 ===============

Item was changed:
  ----- Method: FileDirectoryWrapper>>contents (in category 'accessing') -----
  contents
  
+ 	^((model directoryNamesFor: item) sorted: [ :a :b | a caseInsensitiveLessOrEqual: b]) collect: [ :n | 
- 	^((model directoryNamesFor: item) sortBy: [ :a :b | a caseInsensitiveLessOrEqual: b]) collect: [ :n | 
  		FileDirectoryWrapper with: (item directoryNamed: n) name: n model: self
  	]
  !

Item was changed:
  ----- Method: PasteUpMorph>>sortSubmorphsBy: (in category 'viewing') -----
  sortSubmorphsBy: sortOrderSymbol
  	"Sort the receiver's submorphs by the criterion indicated in the provided symbol"
  	self invalidRect: self fullBounds.
+ 	submorphs := submorphs sorted: [:a :b | (a perform: sortOrderSymbol) <= (b perform: sortOrderSymbol)].
- 	submorphs := submorphs sortBy:[:a :b | (a perform: sortOrderSymbol) <= (b perform: sortOrderSymbol)].
  	self layoutChanged.!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>themesAndWindowColorsOn: (in category 'submenu - extras') -----
  themesAndWindowColorsOn: menu
  
  	| themes |
+ 	themes := UserInterfaceTheme allThemes asArray sorted: [:t1 :t2 |
- 	themes := UserInterfaceTheme allThemes asArray sortBy: [:t1 :t2 |
  		t1 name <= t2 name].
  	
  	menu addItem:[:item|
  		item
  			contents: (Model useColorfulWindows ifTrue: ['<yes>'] ifFalse: ['<no>']), 'Colorful Windows' translated;
  			target: self;
  			selector: #toggleColorfulWindows].
  	menu addItem:[:item|
  		item
  			contents: (SystemWindow gradientWindow not ifTrue: ['<yes>'] ifFalse: ['<no>']), 'Flat Widget Look' translated;
  			target: self;
  			selector: #toggleGradients].
  	menu addLine.
  	menu addItem:[:item |
  		item
  			contents: (((Preferences valueOfFlag: #menuAppearance3d ifAbsent: [false]) and: [Morph useSoftDropShadow]) ifTrue: ['<yes>'] ifFalse: ['<no>']), 'Soft Shadows' translated;
  			target: self;
  			selector: #toggleSoftShadows].
  	menu addItem:[:item |
  		item
  			contents: (((Preferences valueOfFlag: #menuAppearance3d ifAbsent: [false]) and: [Morph useSoftDropShadow not]) ifTrue: ['<yes>'] ifFalse: ['<no>']), 'Hard Shadows' translated;
  			target: self;
  			selector: #toggleHardShadows].
  	menu addLine.
  	menu addItem:[:item |
  		item
  			contents: (SystemWindow roundedWindowCorners ifTrue: ['<yes>'] ifFalse: ['<no>']), 'Rounded Window/Dialog/Menu Look' translated;
  			target: self;
  			selector: #toggleRoundedWindowLook].
  	menu addItem:[:item |
  		item
  			contents: (PluggableButtonMorph roundedButtonCorners ifTrue: ['<yes>'] ifFalse: ['<no>']), 'Rounded Button/Scrollbar Look' translated;
  			target: self;
  			selector: #toggleRoundedButtonLook].
  
  	
  	menu addLine.
  	
  	themes ifEmpty: [ 
  		menu addItem: [ :item | 
  			item
  				contents: '(No UI themes found.)' translated;
  				isEnabled: false ] ].
  	themes do: [ :each |
  		menu addItem: [ :item |
  			item 
  				contents: (UserInterfaceTheme current == each ifTrue: ['<yes>'] ifFalse: ['<no>']), each name;
  				target: each;
  				selector: #apply ] ].
  	menu
  		addLine;
  		add: 'Edit Current UI Theme...' target: self selector: #editCurrentTheme.!

Item was changed:
  ----- Method: TheWorldMenu>>alphabeticalMorphMenu (in category 'construction') -----
  alphabeticalMorphMenu
  	| list splitLists menu firstChar lastChar subMenu |
  	list := Morph withAllSubclasses select: [:m | m includeInNewMorphMenu].
+ 	list := list sorted: [:c1 :c2 | c1 name < c2 name].
- 	list := list asArray sortBy: [:c1 :c2 | c1 name < c2 name].
  	splitLists := self splitNewMorphList: list depth: 3.
  	menu := MenuMorph new defaultTarget: self.
  	1 to: splitLists size
  		do: 
  			[:i | 
  			firstChar := i = 1 
  				ifTrue: [$A]
  				ifFalse: 
  					[((splitLists at: i - 1) last name first asInteger + 1) 
  								asCharacter].
  			lastChar := i = splitLists size 
  						ifTrue: [$Z]
  						ifFalse: [(splitLists at: i) last name first].
  			subMenu := MenuMorph new.
  			(splitLists at: i) do: 
  					[:cl | 
  					subMenu 
  						add: cl name
  						target: self
  						selector: #newMorphOfClass:event:
  						argument: cl].
  			menu add: firstChar asString , ' - ' , lastChar asString subMenu: subMenu].
  	^menu!



More information about the Squeak-dev mailing list