[squeak-dev] The Trunk: HelpSystem-Core-mt.114.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Aug 13 12:44:02 UTC 2019


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

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

Name: HelpSystem-Core-mt.114
Author: mt
Time: 13 August 2019, 2:44:02.638456 pm
UUID: 02de3e53-a889-2f49-9f25-649182a94f90
Ancestors: HelpSystem-Core-mt.113

Not only entire books, but guard selected topics against editing, too.

=============== Diff against HelpSystem-Core-mt.113 ===============

Item was changed:
  ----- Method: HelpBrowser>>accept: (in category 'actions') -----
  accept: text
  	"Accept edited text. Compile it into a HelpTopic"
  
  	| parent currentKey normalizedText colorsToRemove |
+ 	((self currentParentTopic isNil or: [self currentParentTopic isEditable not])
+ 		or: [self currentTopic isEditable not])
+ 			ifTrue: [^ self inform: 'This help topic cannot be edited.'].
- 	(self currentParentTopic isNil or: [self currentParentTopic isEditable not])
- 		ifTrue: [^ self inform: 'This help topic cannot be edited.'].
  	
  	self changed: #clearUserEdits.
  	
  	"Remove default colors for the sake of UI themes."
  	normalizedText := text.
  	colorsToRemove := {Color black. Color white}.
  	normalizedText runs: (normalizedText runs collect: [:attributes | attributes reject: [:attribute |
  			(((attribute respondsTo: #color) and: [colorsToRemove includes: attribute color])
  				or: [attribute respondsTo: #font])]]).
  
  	parent := self currentParentTopic.
  	currentKey := self currentTopic key.
  
  	isUpdating := true.
  
  	parent accept: normalizedText for: self currentTopic.
  	parent refresh.
  	parent == self rootTopic ifTrue: [self rootTopic: parent].
  	
  	isUpdating := false.
  	
  	self currentTopic: (parent subtopics detect: [:t | t key = currentKey]).!



More information about the Squeak-dev mailing list