Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.772.mcz
==================== Summary ====================
Name: System-mt.772
Author: mt
Time: 22 October 2015, 10:54:57.804 am
UUID: 46118b7a-46d1-41c1-8b5f-0be4d5aaf89a
Ancestors: System-mt.771
Reverts last commit to log change stamps at the granularity of minutes again.
See discussion here: http://forum.world.st/The-Trunk-System-mt-771-mcz-td4856201.html
=============== Diff against System-mt.771 ===============
Item was changed:
----- Method: Utilities class>>changeStamp (in category 'identification') -----
changeStamp
"Answer a string to be pasted into source code to mark who changed it and when."
^ self authorInitials , ' ' , Date today mmddyyyy, ' ',
+ ((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 5)!
- ((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 8)!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.772.mcz
==================== Summary ====================
Name: System-mt.772
Author: mt
Time: 22 October 2015, 10:54:57.804 am
UUID: 46118b7a-46d1-41c1-8b5f-0be4d5aaf89a
Ancestors: System-mt.771
Reverts last commit to log change stamps at the granularity of minutes again.
See discussion here: http://forum.world.st/The-Trunk-System-mt-771-mcz-td4856201.html
=============== Diff against System-mt.771 ===============
Item was changed:
----- Method: Utilities class>>changeStamp (in category 'identification') -----
changeStamp
"Answer a string to be pasted into source code to mark who changed it and when."
^ self authorInitials , ' ' , Date today mmddyyyy, ' ',
+ ((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 5)!
- ((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 8)!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1018.mcz
==================== Summary ====================
Name: Morphic-mt.1018
Author: mt
Time: 22 October 2015, 10:51:51.981 am
UUID: e2faf21f-a955-4d6f-849c-0d844a7eaf2b
Ancestors: Morphic-cmm.1017
Adds support for dropping directories into the image.
=============== Diff against Morphic-cmm.1017 ===============
Item was changed:
----- Method: PasteUpMorph>>dropFiles: (in category 'event handling') -----
dropFiles: anEvent
"Handle a number of dropped files from the OS.
TODO:
- use a more general mechanism for figuring out what to do with the file (perhaps even offering a choice from a menu)
- remember the resource location or (when in browser) even the actual file handle
"
+ | numFiles |
- | numFiles stream handler |
numFiles := anEvent contents.
1 to: numFiles do: [ :i |
+ (FileStream requestDropStream: i)
+ ifNotNil: [:stream |
+ [ (ExternalDropHandler lookupExternalDropHandler: stream) ifNotNil: [:handler |
+ handler handle: stream in: self dropEvent: anEvent ] ]
+ ensure: [ stream close ] ]
+ ifNil: [(FileDirectory requestDropDirectory: i) ifNotNil: [:directory |
+ (ExternalDropHandler lookupExternalDropHandler: directory) ifNotNil: [:handler |
+ handler handle: directory in: self dropEvent: anEvent]]]].!
- (stream := FileStream requestDropStream: i) ifNotNil: [
- handler := ExternalDropHandler lookupExternalDropHandler: stream.
- [ handler ifNotNil: [handler handle: stream in: self dropEvent: anEvent ] ]
- ensure: [ stream close ] ] ].!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1018.mcz
==================== Summary ====================
Name: Morphic-mt.1018
Author: mt
Time: 22 October 2015, 10:51:51.981 am
UUID: e2faf21f-a955-4d6f-849c-0d844a7eaf2b
Ancestors: Morphic-cmm.1017
Adds support for dropping directories into the image.
=============== Diff against Morphic-cmm.1017 ===============
Item was changed:
----- Method: PasteUpMorph>>dropFiles: (in category 'event handling') -----
dropFiles: anEvent
"Handle a number of dropped files from the OS.
TODO:
- use a more general mechanism for figuring out what to do with the file (perhaps even offering a choice from a menu)
- remember the resource location or (when in browser) even the actual file handle
"
+ | numFiles |
- | numFiles stream handler |
numFiles := anEvent contents.
1 to: numFiles do: [ :i |
+ (FileStream requestDropStream: i)
+ ifNotNil: [:stream |
+ [ (ExternalDropHandler lookupExternalDropHandler: stream) ifNotNil: [:handler |
+ handler handle: stream in: self dropEvent: anEvent ] ]
+ ensure: [ stream close ] ]
+ ifNil: [(FileDirectory requestDropDirectory: i) ifNotNil: [:directory |
+ (ExternalDropHandler lookupExternalDropHandler: directory) ifNotNil: [:handler |
+ handler handle: directory in: self dropEvent: anEvent]]]].!
- (stream := FileStream requestDropStream: i) ifNotNil: [
- handler := ExternalDropHandler lookupExternalDropHandler: stream.
- [ handler ifNotNil: [handler handle: stream in: self dropEvent: anEvent ] ]
- ensure: [ stream close ] ] ].!
Marcel Taeumel uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-mt.147.mcz
==================== Summary ====================
Name: Files-mt.147
Author: mt
Time: 22 October 2015, 10:51:13.247 am
UUID: 088e1934-a399-40ed-923c-a0cdca15894b
Ancestors: Files-topa.146
Adds support for dropping directories into the image.
=============== Diff against Files-topa.146 ===============
Item was added:
+ ----- Method: FileDirectory class>>fileReaderServicesForFile:suffix: (in category 'file reader services') -----
+ fileReaderServicesForFile: fullName suffix: suffix
+
+ ^ (self on: fullName) exists
+ ifTrue: [self services]
+ ifFalse: [#()].!
Item was added:
+ ----- Method: FileDirectory class>>initialize (in category 'class initialization') -----
+ initialize
+
+ FileServices registerFileReader: self.!
Item was added:
+ ----- Method: FileDirectory class>>requestDropDirectory: (in category 'dnd requests') -----
+ requestDropDirectory: dropIndex
+
+ ^ self on: (FileStream primDropRequestFileName: dropIndex)!
Item was added:
+ ----- Method: FileDirectory class>>services (in category 'file reader services') -----
+ services
+
+ ^ (self class selectors copyWithout: #services)
+ select: [:symbol | symbol beginsWith: #service]
+ thenCollect: [:selector | self perform: selector]!
Item was added:
+ ----- Method: FileDirectory>>mimeTypes (in category 'path access') -----
+ mimeTypes
+
+ ^ #('text/directory')!
Item was added:
+ ----- Method: FileDirectory>>name (in category 'path access') -----
+ name
+ "Compatibility with StandardFileStream >> #name to be used, for example, for drop event handling."
+
+ ^ self fullName!
Item was changed:
----- Method: FileStream class>>fileReaderServicesForFile:suffix: (in category 'file reader services') -----
fileReaderServicesForFile: fullName suffix: suffix
"Answer services for the given file"
+ "Check whether the given path points to a directory or file."
+ (FileStream isAFileNamed: fullName) ifFalse: [^ #()].
+
^ self servicesWithSuffixes
select: [:spec | spec key anySatisfy: [:pattern | suffix = '*' or: [pattern match: suffix]]]
thenCollect: [:spec | spec value]!
Item was added:
+ ----- Method: FileStream class>>primDropRequestFileName: (in category 'dnd requests') -----
+ primDropRequestFileName: dropIndex
+ "Primitive. Return the file name for some file that was just dropped onto Squeak.
+ Fail if dropIndex is out of range or the primitive is not supported."
+ <primitive: 'primitiveDropRequestFileName' module:'DropPlugin'>
+ ^nil!
Item was removed:
- ----- Method: StandardFileStream>>primDropRequestFileName: (in category 'dnd requests') -----
- primDropRequestFileName: dropIndex
- "Primitive. Return the file name for some file that was just dropped onto Squeak.
- Fail if dropIndex is out of range or the primitive is not supported."
- <primitive: 'primitiveDropRequestFileName' module:'DropPlugin'>
- ^nil!
Item was changed:
----- Method: StandardFileStream>>requestDropStream: (in category 'dnd requests') -----
requestDropStream: dropIndex
"Return a read-only stream for some file the user has just dropped onto Squeak."
| rawName |
+ rawName := self class primDropRequestFileName: dropIndex.
- rawName := self primDropRequestFileName: dropIndex.
name := (FilePath pathName: rawName isEncoded: true) asSqueakPathName.
fileID := self primDropRequestFileHandle: dropIndex.
fileID == nil ifTrue:[^nil].
self register.
rwmode := false.
buffer1 := String new: 1.
self enableReadBuffering
!
Marcel Taeumel uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-mt.147.mcz
==================== Summary ====================
Name: Files-mt.147
Author: mt
Time: 22 October 2015, 10:51:13.247 am
UUID: 088e1934-a399-40ed-923c-a0cdca15894b
Ancestors: Files-topa.146
Adds support for dropping directories into the image.
=============== Diff against Files-topa.146 ===============
Item was added:
+ ----- Method: FileDirectory class>>fileReaderServicesForFile:suffix: (in category 'file reader services') -----
+ fileReaderServicesForFile: fullName suffix: suffix
+
+ ^ (self on: fullName) exists
+ ifTrue: [self services]
+ ifFalse: [#()].!
Item was added:
+ ----- Method: FileDirectory class>>initialize (in category 'class initialization') -----
+ initialize
+
+ FileServices registerFileReader: self.!
Item was added:
+ ----- Method: FileDirectory class>>requestDropDirectory: (in category 'dnd requests') -----
+ requestDropDirectory: dropIndex
+
+ ^ self on: (FileStream primDropRequestFileName: dropIndex)!
Item was added:
+ ----- Method: FileDirectory class>>services (in category 'file reader services') -----
+ services
+
+ ^ (self class selectors copyWithout: #services)
+ select: [:symbol | symbol beginsWith: #service]
+ thenCollect: [:selector | self perform: selector]!
Item was added:
+ ----- Method: FileDirectory>>mimeTypes (in category 'path access') -----
+ mimeTypes
+
+ ^ #('text/directory')!
Item was added:
+ ----- Method: FileDirectory>>name (in category 'path access') -----
+ name
+ "Compatibility with StandardFileStream >> #name to be used, for example, for drop event handling."
+
+ ^ self fullName!
Item was changed:
----- Method: FileStream class>>fileReaderServicesForFile:suffix: (in category 'file reader services') -----
fileReaderServicesForFile: fullName suffix: suffix
"Answer services for the given file"
+ "Check whether the given path points to a directory or file."
+ (FileStream isAFileNamed: fullName) ifFalse: [^ #()].
+
^ self servicesWithSuffixes
select: [:spec | spec key anySatisfy: [:pattern | suffix = '*' or: [pattern match: suffix]]]
thenCollect: [:spec | spec value]!
Item was added:
+ ----- Method: FileStream class>>primDropRequestFileName: (in category 'dnd requests') -----
+ primDropRequestFileName: dropIndex
+ "Primitive. Return the file name for some file that was just dropped onto Squeak.
+ Fail if dropIndex is out of range or the primitive is not supported."
+ <primitive: 'primitiveDropRequestFileName' module:'DropPlugin'>
+ ^nil!
Item was removed:
- ----- Method: StandardFileStream>>primDropRequestFileName: (in category 'dnd requests') -----
- primDropRequestFileName: dropIndex
- "Primitive. Return the file name for some file that was just dropped onto Squeak.
- Fail if dropIndex is out of range or the primitive is not supported."
- <primitive: 'primitiveDropRequestFileName' module:'DropPlugin'>
- ^nil!
Item was changed:
----- Method: StandardFileStream>>requestDropStream: (in category 'dnd requests') -----
requestDropStream: dropIndex
"Return a read-only stream for some file the user has just dropped onto Squeak."
| rawName |
+ rawName := self class primDropRequestFileName: dropIndex.
- rawName := self primDropRequestFileName: dropIndex.
name := (FilePath pathName: rawName isEncoded: true) asSqueakPathName.
fileID := self primDropRequestFileHandle: dropIndex.
fileID == nil ifTrue:[^nil].
self register.
rwmode := false.
buffer1 := String new: 1.
self enableReadBuffering
!