[squeak-dev] The Trunk: ST80-ul.224.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 13 14:59:05 UTC 2017


Levente Uzonyi uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-ul.224.mcz

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

Name: ST80-ul.224
Author: ul
Time: 13 March 2017, 2:54:45.096902 pm
UUID: b10fdcb4-2a00-4eaa-ae13-f1650bfc0b92
Ancestors: ST80-ul.223

SortedCollection Whack-a-mole

=============== Diff against ST80-ul.223 ===============

Item was changed:
  ----- Method: ControlManager>>findWindowSatisfying: (in category 'scheduling') -----
  findWindowSatisfying: aBlock
  	"Present a menu of window titles, and activate the one that gets chosen"
  
+ 	| sortAlphabetically controllers labels index |
- 	| sortAlphabetically controllers listToUse labels index |
  	sortAlphabetically := Sensor shiftPressed.
  	controllers := OrderedCollection new.
  	scheduledControllers do: [:controller |
  		controller == screenController ifFalse:
  			[(aBlock value: controller) ifTrue: [controllers addLast: controller]]].
  	controllers size = 0 ifTrue: [^ self].
+ 	sortAlphabetically ifTrue: [controllers sort: [:a :b | a view label < b view label]].
- 	listToUse := sortAlphabetically
- 		ifTrue: [controllers asSortedCollection: [:a :b | a view label < b view label]]
- 		ifFalse: [controllers].
  	labels := String streamContents:
  		[:strm | 
+ 			controllers do: [:controller | strm nextPutAll: (controller view label contractTo: 40); cr].
- 			listToUse do: [:controller | strm nextPutAll: (controller view label contractTo: 40); cr].
  		strm skip: -1  "drop last cr"].
  	index := (UIManager default chooseFrom: labels lines).
  	index > 0 ifTrue:
+ 		[self activateController: (controllers at: index)].
- 		[self activateController: (listToUse at: index)].
  !



More information about the Squeak-dev mailing list