[squeak-dev] The Trunk: Morphic-mt.1848.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jan 19 10:43:37 UTC 2022


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

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

Name: Morphic-mt.1848
Author: mt
Time: 19 January 2022, 11:43:33.065855 am
UUID: 56412359-eb04-5045-84b4-aa6d019739b4
Ancestors: Morphic-mt.1847

Fixes GetText export: "withCRs translated" -> "translated withCRs"

=============== Diff against Morphic-mt.1847 ===============

Item was changed:
  ----- Method: FontImporterTool>>import (in category 'actions') -----
  import
  	| megaSize filenames fonts |
  	fonts := self currentSelection.
  	filenames := fonts allFilenames.
  	megaSize := ((filenames inject: 0 into: [ :sum :fn |
  		sum + (FileStream readOnlyFileNamed: fn do: [:file | file size])]) / (1024 * 1024)) asFloat.
  	(UIManager default confirm: (
  'About to import {1}{2}.\\This is at least {3} MB of space required in the image.\
  Please respect the copyright and embedding restrictions of the font.\
  Proceed?' 
+ 		translated withCRs format: {
- 		withCRs translated format: {
  			self currentParent 
  				ifNotNil: [:p| p fontname, ' ', self currentSelection fontname]
  				ifNil: [self currentSelection fontname].
  			filenames size > 1 ifTrue: [' ({1} font files)' translated format: {filenames size}] ifFalse: [''].
  			megaSize printShowingDecimalPlaces: 2}))
  		ifTrue: [ 
  			filenames do: [:filename | | readFonts |
  				readFonts := TTCFontDescription addFromTTFile: filename.
  				readFonts isCollection
  					ifFalse: [TTCFont newTextStyleFromTT: readFonts]
  					ifTrue: [self importFontFamily: readFonts]]].
  	self allFonts: nil. "force redraw"
  	TTCFont registerAll.!

Item was changed:
  ----- Method: KeyboardExerciser>>logEvent: (in category 'event handling') -----
  logEvent: evt
  
  	| eventMorph |
  	evt = self lastEvent
  		ifTrue: [^ self logEventRepetition: evt].
  
  	eventMorph := evt asMorph.
  	eventMorph
  		setProperty: #event toValue: evt copy;
+ 		balloonText: ('Click to inspect. Shift+click to explore.\\Virtual key: {8}\Virtual modifiers: {5}\\Physical key: {9}\Physical modifiers: {6}\\Key value: 0x{1} ({2}) \Key character: {3}\Key string: {4}\\{7}' translated withCRs format: {
- 		balloonText: ('Click to inspect. Shift+click to explore.\\Virtual key: {8}\Virtual modifiers: {5}\\Physical key: {9}\Physical modifiers: {6}\\Key value: 0x{1} ({2}) \Key character: {3}\Key string: {4}\\{7}' withCRs translated format: {
  			evt keyValue printPaddedWith: $0 to: 2 base: 16.
  			evt keyValue.
  			evt isKeystroke ifTrue: [evt keyCharacter printString] ifFalse: ['-'].
  			evt isKeystroke ifTrue: [evt keyString printString] ifFalse: ['-'].
  			(evt virtualModifiers joinSeparatedBy: ' ') asUppercase.
  			(evt physicalModifiers joinSeparatedBy: ' ') asUppercase.
  			evt printString.
  			evt virtualKey printString.
  			evt physicalKey asString printString}).
  			
  	eventMorph
  		on: #mouseEnter send: #handleEvent:emphasize: to: self;
  		on: #mouseLeave send: #handleEvent:deemphasize: to: self;
  		on: #mouseDown send: #handleEvent:inspect: to: self.
  
  	self addMorphBack: eventMorph.!

Item was changed:
  ----- Method: KeyboardExerciser>>logEventRepetition: (in category 'event handling') -----
  logEventRepetition: evt
  
  	| label lastEvents box |
  	(self submorphs last hasProperty: #repetition)
  		ifTrue: [box := self submorphs last. label := box submorphs first]
  		ifFalse: [
  			box := Morph new
  				setProperty: #repetition toValue: true;
  				color: Color transparent;
  				layoutPolicy: TableLayout new;
  				hResizing: #shrinkWrap;
  				vResizing:#shrinkWrap;
  				yourself.
  			label := '' asText asMorph lock.
  			box addMorph: label.
  			box setProperty: #event toValue: (OrderedCollection with: self lastEvent).
  			self addMorphBack: box].
  
  	lastEvents := box valueOfProperty: #event.
  	lastEvents add: evt copy.
  	box setProperty: #event toValue: lastEvents.
  
  	label newContents: (('x ', (lastEvents size)) asText
  		addAttribute: (TextFontReference toFont: Preferences standardButtonFont);
  		yourself).
  	box balloonText: ('{1}{2}'  format: {
+ 		lastEvents size > 10 ifTrue: ['... {1} older events and:\' translated withCRs format: {lastEvents size - 10}] ifFalse: [''].
- 		lastEvents size > 10 ifTrue: ['... {1} older events and:\' withCRs translated format: {lastEvents size - 10}] ifFalse: [''].
  		(lastEvents last: (10 min: lastEvents size)) joinSeparatedBy: String cr.
  		}).
  			
  	box
  		on: #mouseEnter send: #handleEvent:emphasize: to: self;
  		on: #mouseLeave send: #handleEvent:deemphasize: to: self;
  		on: #mouseDown send: #handleEvent:inspect: to: self.!

Item was changed:
  ----- Method: MenuMorph>>showKeyboardHelp (in category 'keystroke helpers') -----
  showKeyboardHelp
  
  	| help |
  	help := self balloonMorphClass 
+ 		string: 'Enter text to narrow selection\down to matching items' translated withCRs
- 		string: 'Enter text to narrow selection\down to matching items' withCRs translated
  		for: self 
  		corner: #topLeft.
  	help popUpAt: self topCenter forHand: self activeHand!

Item was changed:
  ----- Method: MorphicProject>>launchSystemFiles:event: (in category 'utilities') -----
  launchSystemFiles: fileStreams event: genericMorphicEvent
  	"Handle a number of files the singleton VM was invoked with again."
  
  	self flag: #todo. "Do something more useful with the image here, e. g. tell the VM to load it."
+ 	self inform: ('Cannot start a second instance of Squeak\with the image "{1}"\because the VM is configured as singleton application.' translated withCRs format: {fileStreams first localName}).!
- 	self inform: ('Cannot start a second instance of Squeak\with the image "{1}"\because the VM is configured as singleton application.' withCRs translated format: {fileStreams first localName}).!

Item was changed:
  ----- Method: PluggableTextMorph>>accept (in category 'menu commands') -----
  accept 
  	"Inform the model of text to be accepted, and return true if OK."
  
  	| priorSelection priorScrollerOffset |
  
  	(self canDiscardEdits and: [(self hasProperty: #alwaysAccept) not])
  		ifTrue: [^ self flash].
  
  	self hasEditingConflicts ifTrue: [
+ 		(self confirm: 'Caution!! This method may have been\changed elsewhere since you started\editing it here.  Accept anyway?' translated withCRs) ifFalse: [^ self flash]].
- 		(self confirm: 'Caution!! This method may have been\changed elsewhere since you started\editing it here.  Accept anyway?' withCRs translated) ifFalse: [^ self flash]].
  
  	priorSelection := self selectionInterval copy.
  	priorScrollerOffset := scroller offset copy.
  	
  	self acceptTextInModel == true
  		ifFalse: [^ self "something went wrong"].
  		
  	self setText: self getText.
  	self hasUnacceptedEdits: false.
  
  	(model dependents
  		detect: [:dep | (dep isKindOf: PluggableTextMorph) and: [dep getTextSelector == #annotation]]
  		ifNone: [nil])
  			ifNotNil: [:aPane | model changed: #annotation].
  
  	"Update the model's internal caches. Note that this is specific to CodeHolder and the stepping it uses for updating. We have to trigger this here manually to avoid that the next step message destroys our selection and scrolling offset."
  	(model respondsTo: #updateCodePaneIfNeeded)
  		ifTrue: [model updateCodePaneIfNeeded].
  	
  	"Restore prior selection:"
  	scroller offset: priorScrollerOffset.
  	selectionInterval := priorSelection.
  	self selectFrom: priorSelection first to: priorSelection last.!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>installAndOpenGitBrowser (in category 'menu actions') -----
  installAndOpenGitBrowser 
  	
  	(Smalltalk hasClassNamed: #SquitBrowser)
  		ifFalse: [ (UIManager default
+ 					confirm: 'The Git infrastructure and browser is not yet installed.\\Do you want to install the Git Browser?\\(Note that this step requires an internet connection and\may take several minutes.)' translated withCRs
- 					confirm: 'The Git infrastructure and browser is not yet installed.\\Do you want to install the Git Browser?\\(Note that this step requires an internet connection and\may take several minutes.)' withCRs translated
  					title: 'Confirm Installation Request' )
  			ifTrue: [ Installer
  						ensureRecentMetacello;
  						installGitInfrastructure.
  					TheWorldMainDockingBar updateInstances ]
  			ifFalse: [ ^self ] ].
  	(Smalltalk classNamed: #SquitBrowser) open.
  !

Item was changed:
  ----- Method: TheWorldMainDockingBar>>resetAllThemes (in category 'submenu - extras') -----
  resetAllThemes
  
+ 	(Project uiManager confirm: 'Do you want to reset all UI themes\to their original state?\\(The current theme and scale factor\will be restored if possible.)' translated withCRs title: 'Reset All Themes')
- 	(Project uiManager confirm: 'Do you want to reset all UI themes\to their original state?\\(The current theme and scale factor\will be restored if possible.)' withCRs translated title: 'Reset All Themes')
  		ifTrue: [UserInterfaceTheme cleanUpAndReset].!



More information about the Squeak-dev mailing list