Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.1463.mcz
==================== Summary ====================
Name: Morphic-cmm.1463
Author: cmm
Time: 7 September 2018, 2:39:40.253459 pm
UUID: b8c63d7a-582f-453c-b85f-c2c315ce4243
Ancestors: Morphic-cmm.1462, Morphic-LM.1462
- Fix halo-invocation on a rotated Morph when halos are on the World.
- Provide access to the TextIndent attribute on the alignment menu.
- Fix a NonBooleanReceiver error that appeared when pressing backspace on a read-only text field.
=============== Diff against Morphic-cmm.1462 ===============
Item was changed:
----- Method: PasteUpMorph>>tryInvokeHalo: (in category 'events-processing') -----
tryInvokeHalo: aUserInputEvent
"Invoke halos around the top-most world container at aUserInputEvent's #position. If it was already halo'd, zero-in on its next inward component morph at that position. Holding Shift during the click reverses this traversal order."
| stack innermost haloTarget |
Preferences noviceMode ifTrue: [ ^ self ].
Morph haloForAll ifFalse: [ ^ self ].
"the stack is the top-most morph to bottom-most."
stack := (self morphsAt: aUserInputEvent position unlocked: true) select:
[ : each | each wantsHaloFromClick or: [ each handlesMouseDown: aUserInputEvent ] ].
innermost := aUserInputEvent hand halo
ifNil: [ stack first ]
ifNotNil:
[ : existingHalo | stack allButFirst "existingHalo is first on the stack, not a target"
detect: [ : each | each owner == self ]
ifFound:
[ : worldContainer | "Is existingHalo's target part of the same worldContainer as the morph clicked?"
(existingHalo target withAllOwners includes: worldContainer)
+ ifTrue: [ "same hierarchy, let #transferHalo: continue to handle it for now." ^self ]
- ifTrue: [ "same hierarchy, let #transferHalo: continue to handle it for now." ^ self ]
ifFalse:
[ "different hierarchy, remove + add."
aUserInputEvent hand removeHalo.
aUserInputEvent shiftPressed
ifTrue: [ stack second "first is still the just removed halo" ]
ifFalse: [ worldContainer ] ] ]
+ ifNone: [ "existingHalo is on the World, defer to #transferHalo: for now." ^self ] ].
- ifNone: [ "Shouldn't get here, but defensive code." self ] ].
"If modifier key is pressed, start at innermost (the target), otherwise the outermost (direct child of the world (self))."
haloTarget := (innermost == self or: [aUserInputEvent shiftPressed])
ifTrue: [ innermost ]
ifFalse:
[ "Find the outermost owner that wants it."
innermost withAllOwners reversed allButFirst
detect: [ : each | each wantsHaloFromClick ]
ifNone: [ "haloTarget has its own mouseDown handler, don't halo." ^ self ] ].
"Now that we have the haloTarget, show the halo."
aUserInputEvent hand
newMouseFocus: haloTarget
event: aUserInputEvent.
haloTarget invokeHaloOrMove: aUserInputEvent.
"aUserInputEvent has been consumed, don't let it cause any further side-effects."
aUserInputEvent ignore!
Item was changed:
----- Method: TextEditor>>backTo: (in category 'typing support') -----
backTo: startIndex
"During typing, backspace to startIndex. If there already is a selection, just delete that selection. Otherwise, check if we did something else than backward-deletion and start a new command if so."
+ morph readOnly ifTrue: [^ false].
- morph readOnly ifTrue: [^ self].
self hasSelection ifTrue: [
"Add checkpoint in undo history."
self replaceSelectionWith: self nullText.
^ true].
startIndex > self text size ifTrue: [^ false].
self selectInvisiblyFrom: startIndex to: self stopIndex-1.
self isTypingIn ifTrue: [
self history current type = #backward
ifFalse: [self closeTypeIn]
ifTrue: [
"Accumulate all deleted characters in current undo command."
self history current contentsBefore replaceFrom: 1 to: 0 with: self selection.
self history current intervalBefore in: [:i |
self history current intervalBefore: (startIndex to: i last)]]].
self openTypeInFor: #backward.
self zapSelectionWith: self nullText.
^ false!
Item was changed:
----- Method: TextEditor>>changeAlignment (in category 'menu messages') -----
changeAlignment
+ | options reply |
+ options := self existingIndentation
+ caseOf:
+ {[0]-> [ #('leftFlush' 'indented' 'centered' 'justified' 'rightFlush') ].
+ [1] -> [ #('leftFlush' 'indented more' 'centered' 'justified' 'rightFlush') ]}
+ otherwise: [ #('leftFlush' 'indented less' 'indented more' 'centered' 'justified' 'rightFlush') ].
+ reply := UIManager default chooseFrom: options values: options.
+ reply ifNil: [ ^ self ].
- | aList reply |
- aList := #(leftFlush centered justified rightFlush).
- reply := UIManager default chooseFrom: aList values: aList.
- reply ifNil:[^self].
self setAlignment: reply.
paragraph composeAll.
self recomputeSelection.
^ true!
Item was added:
+ ----- Method: TextEditor>>existingIndentation (in category 'private') -----
+ existingIndentation
+ ^ paragraph text indentationAmountAt: (self encompassLine: self selectionInterval)!
Item was changed:
----- Method: TextEditor>>setAlignment: (in category 'menu messages') -----
+ setAlignment: selectionString
+ | attr interval |
+ attr := selectionString
+ caseOf:
+ { [ 'indented' ] -> [ TextIndent amount: 1 ].
+ [ 'indented more' ] -> [ TextIndent amount: self existingIndentation+1 ].
+ [ 'indented less' ] -> [ TextIndent amount: (self existingIndentation-1 max: 0) ]}
+ otherwise:
+ [ TextAlignment perform: selectionString asSymbol ].
- setAlignment: aSymbol
- | attr interval |
- attr := TextAlignment perform: aSymbol.
interval := self encompassLine: self selectionInterval.
+ paragraph
- paragraph
replaceFrom: interval first
to: interval last
with: ((paragraph text copyFrom: interval first to: interval last) addAttribute: attr)!
Chris Muller uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-cmm.220.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-cmm.220
Author: cmm
Time: 7 September 2018, 2:38:31.697609 pm
UUID: 8fe33e06-a30e-42d2-a7ca-5f6d924233a0
Ancestors: ToolBuilder-Morphic-tpr.219
Restore keyboard list filtering when choosing files by temporarily avoiding the new dependency on PluggableMulticolumn until it can be improved.
=============== Diff against ToolBuilder-Morphic-tpr.219 ===============
Item was changed:
----- Method: FileAbstractSelectionDialog>>buildFileListWith: (in category 'toolbuilder') -----
buildFileListWith: builder
| listSpec |
+ listSpec := builder pluggableListSpec new.
- listSpec := builder pluggableMultiColumnListSpec new.
listSpec
model: self ;
list: #fileList ;
getIndex: #fileListIndex ;
setIndex: #fileListIndex: ;
menu: nil ;
keyPress: nil ;
frame:
(self
frameOffsetFromTop:0
fromLeft: 0
width: 1
bottomFraction: 1);
hScrollBarPolicy: #always .
^listSpec!
Item was changed:
----- Method: FileAbstractSelectionDialog>>fileList (in category 'file list') -----
fileList
"return the list of files in the currently selected directory; if we haven't yet read an actual directory return empty lists for now"
nameList ifNil: [nameList := dateList := sizeList := #()].
+ ^nameList!
- ^Array with: nameList with: dateList with: sizeList!
Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.1463.mcz
==================== Summary ====================
Name: Morphic-cmm.1463
Author: cmm
Time: 7 September 2018, 2:37:21.377647 pm
UUID: c11ac7b7-0b5b-4814-87d3-9c8eb2b62bce
Ancestors: Morphic-cmm.1462
- Fix halo-invocation on a rotated Morph when halos are on the World.
- Provide access to the TextIndent attribute on the alignment menu.
- Fix a NonBooleanReceiver error that appeared when pressing backspace on a read-only text field.
=============== Diff against Morphic-cmm.1462 ===============
Item was changed:
----- Method: PasteUpMorph>>tryInvokeHalo: (in category 'events-processing') -----
tryInvokeHalo: aUserInputEvent
"Invoke halos around the top-most world container at aUserInputEvent's #position. If it was already halo'd, zero-in on its next inward component morph at that position. Holding Shift during the click reverses this traversal order."
| stack innermost haloTarget |
Preferences noviceMode ifTrue: [ ^ self ].
Morph haloForAll ifFalse: [ ^ self ].
"the stack is the top-most morph to bottom-most."
stack := (self morphsAt: aUserInputEvent position unlocked: true) select:
[ : each | each wantsHaloFromClick or: [ each handlesMouseDown: aUserInputEvent ] ].
innermost := aUserInputEvent hand halo
ifNil: [ stack first ]
ifNotNil:
[ : existingHalo | stack allButFirst "existingHalo is first on the stack, not a target"
detect: [ : each | each owner == self ]
ifFound:
[ : worldContainer | "Is existingHalo's target part of the same worldContainer as the morph clicked?"
(existingHalo target withAllOwners includes: worldContainer)
+ ifTrue: [ "same hierarchy, let #transferHalo: continue to handle it for now." ^self ]
- ifTrue: [ "same hierarchy, let #transferHalo: continue to handle it for now." ^ self ]
ifFalse:
[ "different hierarchy, remove + add."
aUserInputEvent hand removeHalo.
aUserInputEvent shiftPressed
ifTrue: [ stack second "first is still the just removed halo" ]
ifFalse: [ worldContainer ] ] ]
+ ifNone: [ "existingHalo is on the World, defer to #transferHalo: for now." ^self ] ].
- ifNone: [ "Shouldn't get here, but defensive code." self ] ].
"If modifier key is pressed, start at innermost (the target), otherwise the outermost (direct child of the world (self))."
haloTarget := (innermost == self or: [aUserInputEvent shiftPressed])
ifTrue: [ innermost ]
ifFalse:
[ "Find the outermost owner that wants it."
innermost withAllOwners reversed allButFirst
detect: [ : each | each wantsHaloFromClick ]
ifNone: [ "haloTarget has its own mouseDown handler, don't halo." ^ self ] ].
"Now that we have the haloTarget, show the halo."
aUserInputEvent hand
newMouseFocus: haloTarget
event: aUserInputEvent.
haloTarget invokeHaloOrMove: aUserInputEvent.
"aUserInputEvent has been consumed, don't let it cause any further side-effects."
aUserInputEvent ignore!
Item was changed:
----- Method: TextEditor>>backTo: (in category 'typing support') -----
backTo: startIndex
"During typing, backspace to startIndex. If there already is a selection, just delete that selection. Otherwise, check if we did something else than backward-deletion and start a new command if so."
+ morph readOnly ifTrue: [^ false].
- morph readOnly ifTrue: [^ self].
self hasSelection ifTrue: [
"Add checkpoint in undo history."
self replaceSelectionWith: self nullText.
^ true].
startIndex > self text size ifTrue: [^ false].
self selectInvisiblyFrom: startIndex to: self stopIndex-1.
self isTypingIn ifTrue: [
self history current type = #backward
ifFalse: [self closeTypeIn]
ifTrue: [
"Accumulate all deleted characters in current undo command."
self history current contentsBefore replaceFrom: 1 to: 0 with: self selection.
self history current intervalBefore in: [:i |
self history current intervalBefore: (startIndex to: i last)]]].
self openTypeInFor: #backward.
self zapSelectionWith: self nullText.
^ false!
Item was changed:
----- Method: TextEditor>>changeAlignment (in category 'menu messages') -----
changeAlignment
+ | options reply |
+ options := self existingIndentation
+ caseOf:
+ {[0]-> [ #('leftFlush' 'indented' 'centered' 'justified' 'rightFlush') ].
+ [1] -> [ #('leftFlush' 'indented more' 'centered' 'justified' 'rightFlush') ]}
+ otherwise: [ #('leftFlush' 'indented less' 'indented more' 'centered' 'justified' 'rightFlush') ].
+ reply := UIManager default chooseFrom: options values: options.
+ reply ifNil: [ ^ self ].
- | aList reply |
- aList := #(leftFlush centered justified rightFlush).
- reply := UIManager default chooseFrom: aList values: aList.
- reply ifNil:[^self].
self setAlignment: reply.
paragraph composeAll.
self recomputeSelection.
^ true!
Item was added:
+ ----- Method: TextEditor>>existingIndentation (in category 'private') -----
+ existingIndentation
+ ^ paragraph text indentationAmountAt: (self encompassLine: self selectionInterval)!
Item was changed:
----- Method: TextEditor>>setAlignment: (in category 'menu messages') -----
+ setAlignment: selectionString
+ | attr interval |
+ attr := selectionString
+ caseOf:
+ { [ 'indented' ] -> [ TextIndent amount: 1 ].
+ [ 'indented more' ] -> [ TextIndent amount: self existingIndentation+1 ].
+ [ 'indented less' ] -> [ TextIndent amount: (self existingIndentation-1 max: 0) ]}
+ otherwise:
+ [ TextAlignment perform: selectionString asSymbol ].
- setAlignment: aSymbol
- | attr interval |
- attr := TextAlignment perform: aSymbol.
interval := self encompassLine: self selectionInterval.
+ paragraph
- paragraph
replaceFrom: interval first
to: interval last
with: ((paragraph text copyFrom: interval first to: interval last) addAttribute: attr)!
Bert Freudenberg uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-bf.401.mcz
==================== Summary ====================
Name: Graphics-bf.401
Author: bf
Time: 6 September 2018, 9:07:20.751843 pm
UUID: 5b99d1d2-9c19-4c39-a224-eb7a34372ce6
Ancestors: Graphics-tpr.400
Fix screen size check when using virtual display
=============== Diff against Graphics-tpr.400 ===============
Item was changed:
----- Method: DisplayScreen class>>checkForNewScreenSize (in category 'display box access') -----
checkForNewScreenSize
"Check whether the screen size has changed and if so take appropriate actions"
+ Display isVirtualScreen ifTrue: [^Display checkForNewScreenSize].
+
Display extent = DisplayScreen actualScreenSize
ifFalse: [Display restore].!
Patrick Rein uploaded a new version of ReleaseBuilder to project The Trunk:
http://source.squeak.org/trunk/ReleaseBuilder-pre.188.mcz
==================== Summary ====================
Name: ReleaseBuilder-pre.188
Author: pre
Time: 6 September 2018, 1:20:52.601454 pm
UUID: 78992ae3-fcc1-f741-9d87-484d8440bfef
Ancestors: ReleaseBuilder-tpr.187
Bumps version to 5.2beta and thereby sets the feature freeze in agreement with Edgar. Also fixes a minor bug in the release builder.
=============== Diff against ReleaseBuilder-tpr.187 ===============
Item was changed:
----- Method: ReleaseBuilder class>>initialize (in category 'class initialization') -----
initialize
QAndA ifNil: [self clearQAndA].
"We have to be after AutoStart so that Morphic is up and running."
Smalltalk addToStartUpList: ReleaseBuilder after: AutoStart.
+ SystemVersion newVersion: 'Squeak5.2beta'!
- SystemVersion newVersion: 'Squeak5.2alpha'!
Item was changed:
----- Method: ReleaseBuilder class>>releaseVersionMajor (in category 'accessing') -----
releaseVersionMajor
+ ^ NextMajorVersion ifNil: [SystemVersion current majorVersionNumber]!
- ^ NextMajorVersion ifNil: [5]!
Item was changed:
----- Method: ReleaseBuilder class>>releaseVersionMinor (in category 'accessing') -----
releaseVersionMinor
+ ^ NextMinorVersion ifNil: [SystemVersion current minorVersionNumber]!
- ^ NextMinorVersion ifNil: [1]!
Patrick Rein uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-pre.1042.mcz
==================== Summary ====================
Name: System-pre.1042
Author: pre
Time: 5 September 2018, 4:56:50.998822 pm
UUID: 842afa63-0116-f84c-bb10-e82e86728dfb
Ancestors: System-eem.1041
Fixes a bug with the new MailSender probably due to an incomplete changeset. The missing attributes have already been used but were not part of the protocol of MailSender.
=============== Diff against System-eem.1041 ===============
Item was changed:
AppRegistry subclass: #MailSender
instanceVariableNames: ''
+ classVariableNames: 'SmtpServer SmtpServerPort UserEmail UserName UserPassword'
- classVariableNames: 'SmtpServer UserName'
poolDictionaries: ''
category: 'System-Applications'!
Item was added:
+ ----- Method: MailSender class>>isSmtpServerPortSet (in category 'testing') -----
+ isSmtpServerPortSet
+ ^ SmtpServerPort notNil and: [SmtpServerPort isNumber]
+ !
Item was added:
+ ----- Method: MailSender class>>isUserEmailSet (in category 'testing') -----
+ isUserEmailSet
+ ^ UserEmail notNil and: [UserEmail notEmpty]
+ !
Item was added:
+ ----- Method: MailSender class>>isUserNameSet (in category 'testing') -----
+ isUserNameSet
+ ^ UserName notNil and: [UserName notEmpty]
+ !
Item was added:
+ ----- Method: MailSender class>>isUserPasswordSet (in category 'testing') -----
+ isUserPasswordSet
+ ^ UserPassword notNil and: [UserPassword notEmpty]
+ !
Item was added:
+ ----- Method: MailSender class>>reset (in category 'initialize-release') -----
+ reset
+
+ UserName := UserPassword := UserEmail := SmtpServer := SmtpServerPort := nil.!
Item was added:
+ ----- Method: MailSender class>>setSmtpServerPort (in category 'settings') -----
+ setSmtpServerPort
+ "Set the SMTP server port used to send outgoing messages via"
+ SmtpServerPort ifNil: [SmtpServerPort := 25].
+ SmtpServerPort := (UIManager default
+ request: 'What is your mail server port for outgoing mail?'
+ initialAnswer: SmtpServerPort asString) asNumber.
+ !
Item was added:
+ ----- Method: MailSender class>>setUserEmail (in category 'settings') -----
+ setUserEmail
+ "Change the user's email for use in composing messages."
+
+ (UIManager default
+ request: 'What is your email address?\(This is the address other people will reply to you)' withCRs
+ initialAnswer: (UserEmail ifNil: [UserEmail := '']))
+ ifNotNil: [:answer | UserEmail := answer]!
Item was changed:
----- Method: MailSender class>>setUserName (in category 'settings') -----
setUserName
- "Change the user's email name for use in composing messages."
(UIManager default
+ request: 'What is your user name on the SMTP server?' withCRs
- request: 'What is your email address?\(This is the address other people will reply to you)' withCRs
initialAnswer: (UserName ifNil: [UserName := '']))
ifNotNil: [:answer | UserName := answer]!
Item was added:
+ ----- Method: MailSender class>>setUserPassword (in category 'settings') -----
+ setUserPassword
+
+ UserPassword ifNil: [UserPassword := ''].
+ (UIManager default
+ requestPassword: 'What is your server passwort?' withCRs)
+ ifNotNil: [:answer | UserPassword := answer]!
Item was changed:
----- Method: MailSender class>>smtpServer (in category 'accessing') -----
smtpServer
"Answer the server for sending email"
+ self isSmtpServerSet ifFalse: [self setSmtpServer].
+ SmtpServer isEmpty ifTrue: [ self error: 'no SMTP server specified' ].
- self isSmtpServerSet
- ifFalse: [self setSmtpServer].
- SmtpServer isEmpty ifTrue: [
- self error: 'no SMTP server specified' ].
^SmtpServer!
Item was added:
+ ----- Method: MailSender class>>smtpServerPort (in category 'accessing') -----
+ smtpServerPort
+ "Answer the server for sending email"
+
+ self isSmtpServerPortSet ifFalse: [self setSmtpServerPort].
+ SmtpServerPort isNil ifTrue: [ self error: 'no SMTP server port specified' ].
+
+ ^SmtpServerPort!
Item was added:
+ ----- Method: MailSender class>>userEmail (in category 'accessing') -----
+ userEmail
+ "Answer the user name to be used for sending out messages."
+
+ self isUserEmailSet ifFalse: [self setUserEmail].
+
+ UserEmail isEmpty ifTrue: [ self error: 'no user email specified' ].
+
+ ^UserEmail!
Item was changed:
----- Method: MailSender class>>userName (in category 'accessing') -----
userName
+ "Answer the user name to be used for sending out messages."
- "Answer the user name to be used in composing messages."
+ self isUserNameSet ifFalse: [self setUserName].
- (UserName isNil or: [UserName isEmpty])
- ifTrue: [self setUserName].
UserName isEmpty ifTrue: [ self error: 'no user name specified' ].
^UserName!
Item was added:
+ ----- Method: MailSender class>>userPassword (in category 'accessing') -----
+ userPassword
+
+ self isUserPasswordSet ifFalse: [self setUserPassword].
+
+ UserPassword isEmpty ifTrue: [ self error: 'no user name specified' ].
+
+ ^ UserPassword!
Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.1462.mcz
==================== Summary ====================
Name: Morphic-cmm.1462
Author: cmm
Time: 3 September 2018, 8:57:57.317349 pm
UUID: 048b437d-9cac-4a1e-a0e9-0e672aca738f
Ancestors: Morphic-kfr.1460
Fix halo-invocation on rotated morphs.
=============== Diff against Morphic-kfr.1460 ===============
Item was changed:
----- Method: PasteUpMorph>>tryInvokeHalo: (in category 'events-processing') -----
tryInvokeHalo: aUserInputEvent
"Invoke halos around the top-most world container at aUserInputEvent's #position. If it was already halo'd, zero-in on its next inward component morph at that position. Holding Shift during the click reverses this traversal order."
| stack innermost haloTarget |
Preferences noviceMode ifTrue: [ ^ self ].
Morph haloForAll ifFalse: [ ^ self ].
"the stack is the top-most morph to bottom-most."
stack := (self morphsAt: aUserInputEvent position unlocked: true) select:
[ : each | each wantsHaloFromClick or: [ each handlesMouseDown: aUserInputEvent ] ].
innermost := aUserInputEvent hand halo
ifNil: [ stack first ]
ifNotNil:
[ : existingHalo | stack allButFirst "existingHalo is first on the stack, not a target"
detect: [ : each | each owner == self ]
ifFound:
[ : worldContainer | "Is existingHalo's target part of the same worldContainer as the morph clicked?"
(existingHalo target withAllOwners includes: worldContainer)
ifTrue: [ "same hierarchy, let #transferHalo: continue to handle it for now." ^ self ]
ifFalse:
[ "different hierarchy, remove + add."
aUserInputEvent hand removeHalo.
aUserInputEvent shiftPressed
ifTrue: [ stack second "first is still the just removed halo" ]
ifFalse: [ worldContainer ] ] ]
ifNone: [ "Shouldn't get here, but defensive code." self ] ].
"If modifier key is pressed, start at innermost (the target), otherwise the outermost (direct child of the world (self))."
+ haloTarget := (innermost == self or: [aUserInputEvent shiftPressed])
- haloTarget := aUserInputEvent shiftPressed
ifTrue: [ innermost ]
+ ifFalse:
+ [ "Find the outermost owner that wants it."
+ innermost withAllOwners reversed allButFirst
+ detect: [ : each | each wantsHaloFromClick ]
+ ifNone: [ "haloTarget has its own mouseDown handler, don't halo." ^ self ] ].
- ifFalse: [ innermost == self ifTrue: [innermost] ifFalse: [(innermost withAllOwners copyWithout: self) last] ].
- haloTarget wantsHaloFromClick ifFalse: [ "haloTarget has its own event handler." ^ self ].
"Now that we have the haloTarget, show the halo."
aUserInputEvent hand
newMouseFocus: haloTarget
event: aUserInputEvent.
haloTarget invokeHaloOrMove: aUserInputEvent.
"aUserInputEvent has been consumed, don't let it cause any further side-effects."
aUserInputEvent ignore!