[squeak-dev] The Trunk: Morphic-ct.1825.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Dec 15 16:48:48 UTC 2021

Christoph Thiede uploaded a new version of Morphic to project The Trunk:

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

Name: Morphic-ct.1825
Author: ct
Time: 15 December 2021, 5:48:39.540981 pm
UUID: 51a9514e-bff7-5e42-92be-97336b8b1b8e
Ancestors: Morphic-mt.1824

Slightly revises appearance of the changes menu in the docking bar: Unifies the indentation of icons if the preference "colorful windows" is disabled.

=============== Diff against Morphic-mt.1824 ===============

Item was changed:
  ----- Method: TheWorldMainDockingBar>>listChangesOn: (in category 'submenu - changes') -----
  listChangesOn: menu
  	| fetchChangesBlock |
  		'Browse current change set' translated. #browseChangeSet. nil.
  		'Browse changed methods' translated. #browseChangedMethods. nil.
  		nil. nil. nil.
  		'Simple Change Sorter' translated.	#browseChanges. ChangeSorter.
  		'Dual Change Sorter' translated. #browseChangesDual. DualChangeSorter.
  		nil. nil. nil.
  	} groupsDo: [:label :selector :modelClass |
  		label ifNil: [menu addLine] ifNotNil: [
  			menu addItem: [:item |
  					contents: label;
+ 					icon: ((modelClass ifNotNil: [self colorIcon: modelClass basicNew windowColorToUse])
+ 						ifNil: [MenuIcons blankIcon]);
- 					icon: (modelClass ifNotNil: [self colorIcon: modelClass basicNew windowColorToUse]);
  					target: self;
  					selector: selector]] ].
  	fetchChangesBlock := [ | latestMethodChanges latestClassChanges updateBlock |
  		self flag: #concurrency. "mt: Is this safe enough given the current update frequency of change sets and when this code is executed?"
  		latestMethodChanges := (Array streamContents: [:s |
  			ChangeSet current changedMethodsDo: [:method :changeType :dateAndTime :category |
  				s nextPut: { dateAndTime. method. changeType. category }]])
  				sorted: [:a :b | a first >= b first].
  		latestClassChanges := (Array streamContents: [:s |
  			ChangeSet current changedClassesDo: [:class :changeTypes :dateAndTime :category |
  				"We are not interested in classes whose method's did only change."
  				changeTypes ifNotEmpty: [s nextPut: { dateAndTime. class. changeTypes. category }]]])
  				sorted: [:a :b | a first >= b first].
  		updateBlock := [self listMethodChanges: latestMethodChanges andClassChanges: latestClassChanges on: menu].
  		Project current uiProcess == Processor activeProcess
  			ifTrue: updateBlock
  			ifFalse: [Project current addDeferredUIMessage: [
  				menu isInWorld ifTrue: [menu lastItem delete. updateBlock value]] ]].
  	ChangeSet current numberOfChanges <= 30
  		ifTrue: fetchChangesBlock ifFalse: [
  			"We have too much data to process. Do it in the background to keep the UI responsive."
  			menu add: '... fetching changes ...' translated action: nil.
  			menu lastItem isEnabled: false.
  			fetchChangesBlock forkAt: Processor userBackgroundPriority].!

More information about the Squeak-dev mailing list