The Inbox: System-ct.1095.mcz

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

The Inbox: System-ct.1095.mcz

commits-2
A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-ct.1095.mcz

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

Name: System-ct.1095
Author: ct
Time: 21 September 2019, 7:00:44.269935 pm
UUID: e3a69ad6-81fc-a34e-ada9-326fe3f01269
Ancestors: System-mt.1093

Only ask once per project tree for confirmation

=============== Diff against System-mt.1093 ===============

Item was changed:
  ----- Method: Project>>okToChange (in category 'release') -----
  okToChange
  "Answer whether the window in which the project is housed can be dismissed -- which is destructive. We never clobber a project without confirmation"
 
  | answer |
  (self confirm: ('Do you really want to delete the project\{1}\and all its content?' withCRs translated format:{self name}))
  ifFalse: [^ false].
 
  self subProjects ifNotEmpty: [:sp |
  answer := Project uiManager
  chooseFrom: #(
  "1" 'Lift all sub-projects'
  "2" 'Discard all sub-projects (NO UNDO!!)'
  "3 or 0" 'Cancel')
  lines: #(2)
  title: ('The project {1}\contains {2} sub-project(s).' withCRs translated format:{self name. sp size}).
 
  (answer = 0 or: [answer = 3]) ifTrue: [^ false].
  answer = 1 ifTrue: [self liftSubProjects. ^ true].
+ answer = 2 ifTrue: [^ sp allSatisfy: [:ea |
+ [ea okToChange] valueSuppressingMessages: {'*delete the project*and all its content*'}]]].
- answer = 2 ifTrue: [^ sp allSatisfy: [:ea | ea okToChange]]].
 
  ^ true!