[squeak-dev] The Trunk: System-ct.1280.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Jan 10 22:03:44 UTC 2022
Christoph Thiede uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ct.1280.mcz
==================== Summary ====================
Name: System-ct.1280
Author: ct
Time: 10 January 2022, 11:03:03.429359 pm
UUID: fa106a43-6333-374a-aa71-53ab31792e69
Ancestors: System-ct.1279
Honors preference #checkForUnsavedProjects when closing a project.
=============== Diff against System-ct.1279 ===============
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 isCurrentProject and: [self isTopProject]) ifTrue: [
self inform: 'You cannot close the top project.'.
^ false].
+ ((Preferences valueOfFlag: #checkForUnsavedProjects) ==>
+ [self confirm: ('Do you really want to delete the project\{1}\and all its content?' withCRs translated format:{self name})])
- (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*'}]]].
^ true!
More information about the Squeak-dev
mailing list
|