[squeak-dev] The Trunk: Tools-mt.1024.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jan 14 12:21:18 UTC 2021


Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.1024.mcz

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

Name: Tools-mt.1024
Author: mt
Time: 14 January 2021, 1:21:15.354081 pm
UUID: 0ef67378-0ca6-4743-be9c-5a60621c07cd
Ancestors: Tools-mt.1023

Improves the description of several confirmation dialogs for removing batches of source code.

=============== Diff against Tools-mt.1023 ===============

Item was changed:
  ----- Method: Browser>>removeMessageCategory (in category 'message category functions') -----
  removeMessageCategory
  	"If a message category is selected, create a Confirmer so the user can 
  	verify that the currently selected message category should be removed
   	from the system. If so, remove it."
  
  	| messageCategoryName |
  	self hasMessageCategorySelected ifFalse: [^ self].
  	self okToChange ifFalse: [^ self].
  	messageCategoryName := self selectedMessageCategoryName.
  	(self messageList size = 0
+ 		or: [Project uiManager confirm: ('Are you sure you want to remove\the message category\\	{1}\	in {2}\\and all its {3} methods? Maybe save\your image before doing this.' translated withCRs asText format: {
+ 				messageCategoryName asText allBold.
+ 				self selectedClassOrMetaClass name.
+ 				(self selectedClassOrMetaClass organization listAtCategoryNamed: messageCategoryName) size asString asText allBold
+ 					
+ 					}) title: 'Remove Message Category' translated])
- 		or: [self confirm: 'Are you sure you want to
- remove this method category 
- and all its methods?'])
  		ifTrue: 
  			[self selectedClassOrMetaClass removeCategory: messageCategoryName.
  			self selectMessageCategoryNamed: nil.
  			self changed: #classSelectionChanged].
  	self changed: #messageCategoryList.
  !

Item was changed:
  ----- Method: Browser>>removeSystemCategory (in category 'system category functions') -----
  removeSystemCategory
  	"If a class category is selected, create a Confirmer so the user can 
  	verify that the currently selected class category and all of its classes
   	should be removed from the system. If so, remove it."
  
  	self hasSystemCategorySelected ifFalse: [^ self].
  	self okToChange ifFalse: [^ self].
  	(self classList size = 0
+ 		or: [Project uiManager
+ 			confirm: ('Are you sure you want to remove\the system category\\	{1}\\and all its {2} classes? Maybe save\your image before doing this.' translated withCRs asText
+ 				format: {
+ 					self selectedSystemCategory asText allBold.
+ 					(systemOrganizer listAtCategoryNamed: self selectedSystemCategory) size asString asText allBold})
+ 			title: 'Remove System Category' translated])
- 		or: [self confirm: 'Are you sure you want to
- remove this system category 
- and all its classes?'])
  		ifTrue: 
  		[| nextSelectedCat |
  		nextSelectedCat := self systemCategoryList before: self selectedSystemCategory ifAbsent: [nil].
  		systemOrganizer removeSystemCategory: self selectedSystemCategory.
  		self selectSystemCategory: nextSelectedCat.
  		self changed: #systemCategoryList]!

Item was changed:
  ----- Method: CodeHolder>>removeClass (in category 'commands') -----
  removeClass
  	"Remove the selected class from the system, at interactive user request.  Make certain the user really wants to do this, since it is not reversible.  Answer true if removal actually happened."
  
  	| message  className classToRemove result |
  	self okToChange ifFalse: [^ false].
  	classToRemove := self selectedClassOrMetaClass ifNil: [Beeper beep. ^ false].
  	classToRemove := classToRemove theNonMetaClass.
  	className := classToRemove name.
+ 	message := 'Are you sure that you want to remove\the class\\	{1}\\and all its {2} methods? Maybe save\your image before doing this.{3}' translated withCRs asText format: {
+ 		className asText allBold.
+ 		(classToRemove methodDict size + classToRemove class methodDict size) asString asText allBold.
+ 		classToRemove subclasses size > 0 ifFalse: [''] ifTrue: [
+ 			'\\(There are {1} subclasses, whose superclass\must be updated manually after this.)' translated withCRs asText format: { classToRemove subclasses size asString asText allBold }]}.
+ 	(result := Project uiManager confirm: message title: 'Remove Class' translated)
- 	message := 'Are you certain that you
- want to REMOVE the class ', className, '
- from the system?'.
- 	(result := self confirm: message)
  		ifTrue: 
  			[classToRemove subclasses size > 0
  				ifTrue: [(self confirm: 'class has subclasses: ' , message)
  					ifFalse: [^ false]].
  			classToRemove removeFromSystem.
  			self changed: #classList.
  			true].
  	^ result!



More information about the Squeak-dev mailing list