The Trunk: System-ct.1528.mcz

[email protected] Wed, 29 Jul 2026 11:48:50 0000
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <[email protected]>
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ct.1528.mcz

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

Name: System-ct.1528
Author: ct
Time: 28 July 2026, 7:43:10.776175 pm
UUID: e2fee9ff-b258-455b-bc2d-00496085d0c6
Ancestors: System-mt.1527

Fixes discarding of subprojects without n confirmation dialogs after System-mt.1526. Makes #valueSuppressingMessages: less brittle and improves multlingual support.

=============== Diff against System-mt.1527 ===============

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 deleteMsg |
- 	| answer |
  	(self isCurrentProject and: [self isTopProject]) ifTrue:
+ 		[self inform: 'You cannot close the top project.' translated.
- 		[self inform: 'You cannot close the top project.'.
  		^ false].
  	
+ 	deleteMsg := 'Do you really want to delete this project and all its contents?' translated.
  	((Preferences valueOfFlag: #checkForUnsavedProjects) ==>
  		[Project uiManager
+ 			confirm: deleteMsg
- 			confirm: 'Do you really want to delete this project and all its contents?' translated
  			title: self name])
  		ifFalse: [^ false].
  
  	self subProjects ifNotEmpty:
  		[:sp |
  		answer := Project uiManager
  					chooseOptionFrom:
+ 						{"1" 'Lift all sub-projects' translated.
+ 						"2" 'Discard all sub-projects (NO UNDO!!)' translated.
+ 						"3 or 0" 'Cancel' translated} "<-- needs simpler dialogue with a proper cancel button"
- 						#("1" 'Lift all sub-projects'
- 						"2" 'Discard all sub-projects (NO UNDO!!)'
- 						"3 or 0" 'Cancel')"<-- needs simpler dialogue with a proper cancel button"
  					lines: #(2)
  					title: ('The project {1}\contains {2} sub-project(s).' translated withCRs 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: {deleteMsg}]]].	
- 				[ea okToChange] valueSuppressingMessages: {'*delete the project*and all its content*'}]]].	
  	^ true!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]