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! |
Best, Marcel
|
Beautiful! Nearly "too" modern to fit into the entire Squeak appearance - but a very nice step into the right direction ... :-)
Best, Christoph Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Donnerstag, 14. Januar 2021 13:24:13 An: squeak-dev Betreff: Re: [squeak-dev] The Trunk: Tools-mt.1024.mcz Best,
Marcel
Carpe Squeak!
|
> Nearly "too" modern to fit into [...] How come? Too wordy? :-) > but a very nice step into the right direction ... :-) Unfortunately, "manual checkpointing" is the only "undo method" we can provide at this level. Best, Marcel
|
> How come? Too wordy? :-) Not at all, just an elaborate layout, better than pure plain text - elaborate enough that I start wondering whether we could need some set of formatting markup instead of all the "format:", "addAttribute:", "asString
asText allBold" etc. ...
Improve the HTML support, for example a tag for text indent? Or finally implement #asTextFromMarkdown? :-)
(By the way, this "maybe save your image before doing this" reminds me of #isScarySelector: - should we use a similar concept here to prevent too many warnings?)
Best,
Christoph
Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Montag, 25. Januar 2021 11:26:15 An: squeak-dev Betreff: Re: [squeak-dev] The Trunk: Tools-mt.1024.mcz
> Nearly "too" modern to fit into [...]
How come? Too wordy? :-)
> but a very nice step into the right direction ... :-)
Unfortunately, "manual checkpointing" is the only "undo method" we can provide at this level.
Best,
Marcel
Carpe Squeak!
|
> Improve the HTML support, for example a tag for text indent? Or finally implement #asTextFromMarkdown? :-) Hmmm... <b></b> and </ br> should work with #asTextFromHtml. Then we could get rid of (all those) "asString asText allBold" :-) Best, Marcel
|
Free forum by Nabble | Edit this page |