[squeak-dev] The Inbox: Protocols-jr.87.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Aug 21 10:02:22 UTC 2022


A new version of Protocols was added to project The Inbox:
http://source.squeak.org/inbox/Protocols-jr.87.mcz

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

Name: Protocols-jr.87
Author: jr
Time: 21 August 2022, 12:02:21.769052 pm
UUID: 52a1ae59-5dcd-a54d-8d87-24a67ef66fef
Ancestors: Protocols-ct.86

Fix: Lexicons ("browse protocol") started out with just [a number] as the window title.

Since October 2020 the window titles of MessageSets (a Lexicon is a MessageSet) contain the indication of the number of (filtered) messages. See uses of the windowLabel instance variable of MessageSet. Model windows observe the #windowTitle property by default. The MessageSet implementation uses the windowLabel instance variable. But Lexicon was not updated to set that variable, or to override windowTitle, so the title stayed essentially blank except for the number indicator.

=============== Diff against Protocols-ct.86 ===============

Item was changed:
  ----- Method: Lexicon>>adjustWindowTitle (in category 'window title') -----
  adjustWindowTitle
  	"Set the title of the receiver's window, if any, to reflect the current choices"
  
  	| aWindow aLabel catName |
  	(catName := self selectedCategoryName) ifNil: [^ self].
  	(aWindow := self containingWindow) ifNil: [^ self].
  	aLabel := nil.
  	#(	(viewedCategoryName		'Messages already viewed - ')
  		(allCategoryName			'All messages - ')) do:
  			[:aPair | catName = (self categoryWithNameSpecifiedBy: aPair first) ifTrue: [aLabel := aPair second]].
  
  	aLabel ifNil:
  		[aLabel := catName = self class queryCategoryName
  			ifTrue:
  				[self queryCharacterization, ' - ']
  			ifFalse:
  				['Vocabulary of ']].
+ 	windowLabel := aLabel, (self targetObject ifNil: [targetClass]) nameForViewer.
+ 	self changed: #windowTitle.!
- 	aWindow setLabel: aLabel, (self targetObject ifNil: [targetClass]) nameForViewer!

Item was changed:
  ----- Method: Lexicon>>openOnClass:showingSelector: (in category 'toolbuilder') -----
  openOnClass: aTargetClass showingSelector: aSelector
  
  	currentVocabulary ifNil: [currentVocabulary := Vocabulary fullVocabulary].
  	targetClass := aTargetClass.
  	self initialLimitClass.
  	
  	self reformulateCategoryList.
+ 	windowLabel := self startingWindowTitle.
  	ToolBuilder open: self.
  	self adjustWindowTitle.!



More information about the Squeak-dev mailing list