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]! |
Thanks for merging! This was a duplicate of System-ct.1156 (inbox), or are there any differences? :-)
Best, Christoph Von: Squeak-dev <[hidden email]> im Auftrag von [hidden email] <[hidden email]>
Gesendet: Montag, 2. November 2020 14:42:55 An: [hidden email]; [hidden email] Betreff: [squeak-dev] The Trunk: System-mt.1187.mcz 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]!
Carpe Squeak!
|
I am just processing your recent drag-and-drop changest. Best, Marcel
|
Free forum by Nabble | Edit this page |