[squeak-dev] The Trunk: System-mt.1187.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Nov 2 13:42:55 UTC 2020


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

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

Name: System-mt.1187
Author: mt
Time: 2 November 2020, 2:42:51.691816 pm
UUID: fb19b021-de9d-284a-bdea-0d3fd23508c4
Ancestors: System-tpr.1186

Minor code clean-up. Thanks to Christoph (ct)!

=============== Diff against System-tpr.1186 ===============

Item was changed:
  ----- Method: DefaultExternalDropHandler>>chooseServiceFrom: (in category 'private') -----
  chooseServiceFrom: aCollection
+ 	"private - choose a service from aCollection asking the user if needed"
+ 	^ aCollection size = 1 
- 	"private - choose a service from aCollection asking the user if  needed"
- 	^aCollection size = 1 
  		ifTrue: [aCollection anyOne]
+ 		ifFalse: [UIManager default 
+ 			chooseFrom: (aCollection collect: [:each | each label])
- 		ifFalse:[UIManager default 
- 			chooseFrom: (aCollection collect:[:each| each label])
  			values: aCollection
  			title: 'You dropped a file. Please choose a service:' translated withCRs].!

Item was changed:
  ----- Method: DefaultExternalDropHandler>>handle:in:dropEvent: (in category 'event handling') -----
  handle: dropStream in: pasteUp dropEvent: anEvent 
  	"the file was just droped, let's do our job"
  	| fileName services chosen |
  	fileName := dropStream name.
  	services := self servicesForFileNamed: fileName.
+ 	
- 
  	"no service, default behavior"
+ 	services ifEmpty: [
+ 		^ UIManager default edit: dropStream contentsOfEntireFile].
+ 	
- 	services isEmpty 
- 		ifTrue: [^UIManager default edit: dropStream contentsOfEntireFile].
- 
  	chosen := self chooseServiceFrom: services.
+ 	chosen ifNotNil: [chosen performServiceFor: dropStream].!
- 	chosen ifNotNil:[chosen performServiceFor: dropStream]!

Item was changed:
  ----- Method: DefaultExternalDropHandler>>servicesForFileNamed: (in category 'private') -----
  servicesForFileNamed: aString 
+ 	"private - answer a collection of file-services for the file named aString"
+ 
+ 	^ (FileServices itemsForFile: aString)
+ 		copyWithoutAll: self unwantedSelectors!
- 	"private - answer a collection of file-services for the file named  
- 	aString"
- 	| allServices |
- 	allServices := FileServices itemsForFile: aString.
- 	^ allServices
- 		reject: [:svc | self unwantedSelectors includes: svc selector]!



More information about the Squeak-dev mailing list