The Trunk: ST80-nice.116.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: ST80-nice.116.mcz

commits-2
Nicolas Cellier uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-nice.116.mcz

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

Name: ST80-nice.116
Author: nice
Time: 11 June 2010, 10:26:30.909 pm
UUID: c37664b2-7159-b940-97c8-9e0a3ce50509
Ancestors: ST80-nice.115

Use String>>lines to handle any case of in image LF leakage

=============== Diff against ST80-nice.115 ===============

Item was changed:
  ----- Method: ControlManager>>windowFromUser (in category 'scheduling') -----
  windowFromUser
  "Present a menu of window titles, and returns the StandardSystemController belonging to the one that gets chosen, or nil if none"
  | controllers labels index |
  controllers := OrderedCollection new.
  labels := String streamContents:
  [:strm |
  scheduledControllers do:
  [:controller | controller == screenController ifFalse:
  [controllers addLast: controller.
  strm nextPutAll: (controller view label contractTo: 40); cr]].
  strm skip: -1  "drop last cr"].
+ index := (UIManager default chooseFrom: labels lines).
- index := (UIManager default chooseFrom: (labels findTokens: Character cr) asArray).
  ^ index > 0
  ifTrue:
  [controllers at: index]
  ifFalse:
  [nil]!

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 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].
  listToUse := sortAlphabetically
  ifTrue: [controllers asSortedCollection: [:a :b | a view label < b view label]]
  ifFalse: [controllers].
  labels := String streamContents:
  [:strm |
  listToUse do: [:controller | strm nextPutAll: (controller view label contractTo: 40); cr].
  strm skip: -1  "drop last cr"].
+ index := (UIManager default chooseFrom: labels lines).
- index := (UIManager default chooseFrom: (labels findTokens: Character cr) asArray).
  index > 0 ifTrue:
  [self activateController: (listToUse at: index)].
  !