Chris Muller uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-cmm.154.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-cmm.154
Author: cmm
Time: 22 December 2015, 3:33:18.425 pm
UUID: 9c0f9cf0-1b21-448f-8401-f69edc04e17e
Ancestors: ToolBuilder-Morphic-mt.153
Encountered the model already nil'd out before entering PluggableSystemWindow>>#delete on occasion. Protect against that.
=============== Diff against ToolBuilder-Morphic-mt.153 ===============
Item was changed:
----- Method: PluggableSystemWindow>>delete (in category 'initialization') -----
delete
+ (model notNil and: [ closeWindowSelector notNil ]) ifTrue: [ model perform: closeWindowSelector ].
+ super delete!
- closeWindowSelector ifNotNil:[model perform: closeWindowSelector].
- super delete.
- !
Chris Muller uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-cmm.154.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-cmm.154
Author: cmm
Time: 22 December 2015, 3:33:18.425 pm
UUID: 9c0f9cf0-1b21-448f-8401-f69edc04e17e
Ancestors: ToolBuilder-Morphic-mt.153
Encountered the model already nil'd out before entering PluggableSystemWindow>>#delete on occasion. Protect against that.
=============== Diff against ToolBuilder-Morphic-mt.153 ===============
Item was changed:
----- Method: PluggableSystemWindow>>delete (in category 'initialization') -----
delete
+ (model notNil and: [ closeWindowSelector notNil ]) ifTrue: [ model perform: closeWindowSelector ].
+ super delete!
- closeWindowSelector ifNotNil:[model perform: closeWindowSelector].
- super delete.
- !
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1061.mcz
==================== Summary ====================
Name: Morphic-mt.1061
Author: mt
Time: 22 December 2015, 4:46:35.738 pm
UUID: af0fca47-4c9f-4973-ab53-a9fa9edcccef
Ancestors: Morphic-tpr.1060
Text editing: code clean-up and fix for in-place find. Here is how it works:
- You just moved your cursor to some place without selecting something.
- You type something.
- You hit CMD+G to "find again"
- The previous input will be removed and taken as search text.
- The next match will be selected.
- (If you err here, you can undo with CMD+Z to insert the input from above again.)
If you hit CMD+J, nothing will happen because there was no replace operation detected. If you, however, hit CMD+G to find the next match and then continue wit a CMD+J, it will find/replace the next match (with nothing) because your insertion was removed automatically as described above.
=============== Diff against Morphic-tpr.1060 ===============
Item was changed:
----- Method: TextEditor>>again (in category 'menu messages') -----
again
+ "Do the same find/replace command again. Looks up the editor's own command history and uses the previous command to determine find string and replace string."
- "Do the same replace command again. Unlike #findReplaceAgain, this looks up the editor's own command history and uses the previous command."
+ self history hasReplacedSomething
- (self history hasPrevious and: [self history previous hasReplacedSomething])
ifFalse: [morph flash. ^ false].
self
setSearchFromSelectionOrHistory;
setReplacementFromHistory.
"If we have no selection, give the user one to avoid annoying surprises."
^ self hasSelection
ifTrue: [self findReplaceAgainNow]
ifFalse: [self findAgainNow. false "see #againUpToEnd"]!
Item was changed:
----- Method: TextEditor>>findReplaceAgain (in category 'menu messages') -----
findReplaceAgain
-
- self
- setSearchFromSelectionOrHistory;
- setReplacementFromHistory.
+ ^ self again!
- ^ self findReplaceAgainNow!
Item was added:
+ ----- Method: TextEditor>>removePreviousInsertion (in category 'typing support') -----
+ removePreviousInsertion
+ "If the previous command was an insertion, remove it by not undoing it but replacing it with nothing."
+
+ self history hasInsertedSomething ifFalse: [morph flash. ^ false].
+
+ self
+ selectInvisiblyFrom: self history previous intervalBefore first
+ to: self history previous intervalAfter last.
+
+ self replaceSelectionWith: self nullText.
+
+ ^ true
+ !
Item was changed:
----- Method: TextEditor>>setReplacementFromHistory (in category 'accessing') -----
setReplacementFromHistory
"Use history to get the previous replacement."
+ self history hasReplacedSomething
- (self history hasPrevious and: [self history previous hasReplacedSomething])
ifTrue: [ChangeText := self history previous contentsAfter].!
Item was changed:
----- Method: TextEditor>>setSearchFromSelectionOrHistory (in category 'accessing') -----
setSearchFromSelectionOrHistory
"Updates the current string to find with the current selection or the last change if it replaced something and thus had a prior selection."
self hasSelection
ifTrue: [FindText := self selection]
+ ifFalse: [self history hasReplacedSomething
+ ifTrue: [FindText := self history previous contentsBefore]
+ ifFalse: [self history hasInsertedSomething
+ ifTrue: [
+ FindText := self history previous contentsAfter.
+ self removePreviousInsertion. "Undoable."]]]!
- ifFalse: [(self history hasPrevious and: [self history previous hasReplacedSomething])
- ifTrue: [FindText := self history previous contentsBefore]].!
Item was added:
+ ----- Method: TextEditorCommand>>hasInsertedSomething (in category 'testing') -----
+ hasInsertedSomething
+
+ ^ self contentsBefore isEmpty!
Item was added:
+ ----- Method: TextEditorCommandHistory>>hasInsertedSomething (in category 'testing') -----
+ hasInsertedSomething
+
+ ^ self hasPrevious and: [self previous hasInsertedSomething]!
Item was added:
+ ----- Method: TextEditorCommandHistory>>hasReplacedSomething (in category 'testing') -----
+ hasReplacedSomething
+
+ ^ self hasPrevious and: [self previous hasReplacedSomething]!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1061.mcz
==================== Summary ====================
Name: Morphic-mt.1061
Author: mt
Time: 22 December 2015, 4:46:35.738 pm
UUID: af0fca47-4c9f-4973-ab53-a9fa9edcccef
Ancestors: Morphic-tpr.1060
Text editing: code clean-up and fix for in-place find. Here is how it works:
- You just moved your cursor to some place without selecting something.
- You type something.
- You hit CMD+G to "find again"
- The previous input will be removed and taken as search text.
- The next match will be selected.
- (If you err here, you can undo with CMD+Z to insert the input from above again.)
If you hit CMD+J, nothing will happen because there was no replace operation detected. If you, however, hit CMD+G to find the next match and then continue wit a CMD+J, it will find/replace the next match (with nothing) because your insertion was removed automatically as described above.
=============== Diff against Morphic-tpr.1060 ===============
Item was changed:
----- Method: TextEditor>>again (in category 'menu messages') -----
again
+ "Do the same find/replace command again. Looks up the editor's own command history and uses the previous command to determine find string and replace string."
- "Do the same replace command again. Unlike #findReplaceAgain, this looks up the editor's own command history and uses the previous command."
+ self history hasReplacedSomething
- (self history hasPrevious and: [self history previous hasReplacedSomething])
ifFalse: [morph flash. ^ false].
self
setSearchFromSelectionOrHistory;
setReplacementFromHistory.
"If we have no selection, give the user one to avoid annoying surprises."
^ self hasSelection
ifTrue: [self findReplaceAgainNow]
ifFalse: [self findAgainNow. false "see #againUpToEnd"]!
Item was changed:
----- Method: TextEditor>>findReplaceAgain (in category 'menu messages') -----
findReplaceAgain
-
- self
- setSearchFromSelectionOrHistory;
- setReplacementFromHistory.
+ ^ self again!
- ^ self findReplaceAgainNow!
Item was added:
+ ----- Method: TextEditor>>removePreviousInsertion (in category 'typing support') -----
+ removePreviousInsertion
+ "If the previous command was an insertion, remove it by not undoing it but replacing it with nothing."
+
+ self history hasInsertedSomething ifFalse: [morph flash. ^ false].
+
+ self
+ selectInvisiblyFrom: self history previous intervalBefore first
+ to: self history previous intervalAfter last.
+
+ self replaceSelectionWith: self nullText.
+
+ ^ true
+ !
Item was changed:
----- Method: TextEditor>>setReplacementFromHistory (in category 'accessing') -----
setReplacementFromHistory
"Use history to get the previous replacement."
+ self history hasReplacedSomething
- (self history hasPrevious and: [self history previous hasReplacedSomething])
ifTrue: [ChangeText := self history previous contentsAfter].!
Item was changed:
----- Method: TextEditor>>setSearchFromSelectionOrHistory (in category 'accessing') -----
setSearchFromSelectionOrHistory
"Updates the current string to find with the current selection or the last change if it replaced something and thus had a prior selection."
self hasSelection
ifTrue: [FindText := self selection]
+ ifFalse: [self history hasReplacedSomething
+ ifTrue: [FindText := self history previous contentsBefore]
+ ifFalse: [self history hasInsertedSomething
+ ifTrue: [
+ FindText := self history previous contentsAfter.
+ self removePreviousInsertion. "Undoable."]]]!
- ifFalse: [(self history hasPrevious and: [self history previous hasReplacedSomething])
- ifTrue: [FindText := self history previous contentsBefore]].!
Item was added:
+ ----- Method: TextEditorCommand>>hasInsertedSomething (in category 'testing') -----
+ hasInsertedSomething
+
+ ^ self contentsBefore isEmpty!
Item was added:
+ ----- Method: TextEditorCommandHistory>>hasInsertedSomething (in category 'testing') -----
+ hasInsertedSomething
+
+ ^ self hasPrevious and: [self previous hasInsertedSomething]!
Item was added:
+ ----- Method: TextEditorCommandHistory>>hasReplacedSomething (in category 'testing') -----
+ hasReplacedSomething
+
+ ^ self hasPrevious and: [self previous hasReplacedSomething]!
tim Rowledge uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-tpr.1060.mcz
==================== Summary ====================
Name: Morphic-tpr.1060
Author: tpr
Time: 20 December 2015, 10:57:42.928 am
UUID: c999504e-8f74-4941-a116-911eb62f0c74
Ancestors: Morphic-tpr.1059, Morphic-mt.1059
Attempt to correct stupid (probably( mistake in MC usage; I used the 'copy image versions here' menu item in the belief it would do something more sensible than simply copy a file. This clashed with marcel's change and so this is an attempt to re-merge and save a proper version.
=============== Diff against Morphic-tpr.1059 ===============
Item was changed:
----- Method: Form>>scaledIntoFormOfSize:smoothing: (in category '*Morphic') -----
scaledIntoFormOfSize: aNumberOrPoint smoothing: factor
"Scale and center the receiver into a form of a given size"
| extent scaledForm result |
extent := aNumberOrPoint asPoint.
extent = self extent ifTrue: [^ self copy].
scaledForm := self scaledToSize: extent smoothing: factor.
+ result := self species extent: extent depth: self depth.
- result := self species extent: extent depth: 32.
result getCanvas
translucentImage: scaledForm
at: extent - scaledForm extent // 2.
^ result
!
tim Rowledge uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-tpr.1060.mcz
==================== Summary ====================
Name: Morphic-tpr.1060
Author: tpr
Time: 20 December 2015, 10:57:42.928 am
UUID: c999504e-8f74-4941-a116-911eb62f0c74
Ancestors: Morphic-tpr.1059, Morphic-mt.1059
Attempt to correct stupid (probably( mistake in MC usage; I used the 'copy image versions here' menu item in the belief it would do something more sensible than simply copy a file. This clashed with marcel's change and so this is an attempt to re-merge and save a proper version.
=============== Diff against Morphic-tpr.1059 ===============
Item was changed:
----- Method: Form>>scaledIntoFormOfSize:smoothing: (in category '*Morphic') -----
scaledIntoFormOfSize: aNumberOrPoint smoothing: factor
"Scale and center the receiver into a form of a given size"
| extent scaledForm result |
extent := aNumberOrPoint asPoint.
extent = self extent ifTrue: [^ self copy].
scaledForm := self scaledToSize: extent smoothing: factor.
+ result := self species extent: extent depth: self depth.
- result := self species extent: extent depth: 32.
result getCanvas
translucentImage: scaledForm
at: extent - scaledForm extent // 2.
^ result
!
tim Rowledge uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-tpr.1059.mcz
==================== Summary ====================
Name: Morphic-tpr.1059
Author: tpr
Time: 18 December 2015, 4:26:36.049 pm
UUID: ce2af9d7-dcb1-4225-8fea-1a0b3ae28ab4
Ancestors: Morphic-tpr.1058
When opening sub-menus with insufficient rightwards space on the Display we instead put them to the left of the parent. This change makes the leftward slide a bit smaller so that the mouse stays over menus was the user slides to the new menu; thus no strange closing of menus etc.
=============== Diff against Morphic-tpr.1058 ===============
Item was changed:
----- Method: MenuMorph>>popUpAdjacentTo:forHand:from: (in category 'control') -----
popUpAdjacentTo: rightOrLeftPoint forHand: hand from: sourceItem
"Present this menu at the given point under control of the given hand."
| tryToPlace selectedOffset rightPoint leftPoint |
hand world startSteppingSubmorphsOf: self.
popUpOwner := sourceItem.
self fullBounds.
self updateColor.
"ensure layout is current"
selectedOffset := (selectedItem
ifNil: [self items first]) position - self position.
tryToPlace := [:where :mustFit | | delta |
self position: where - selectedOffset.
delta := self boundsInWorld amountToTranslateWithin: sourceItem worldBounds.
(delta x = 0
or: [mustFit])
ifTrue: [delta = (0 @ 0)
ifFalse: [self position: self position + delta].
sourceItem world addMorphFront: self.
^ self]].
rightPoint := rightOrLeftPoint first + ((self layoutInset + self borderWidth) @ 0).
+ leftPoint := rightOrLeftPoint last + ((self layoutInset + self borderWidth - self width) @ 0).
- leftPoint := rightOrLeftPoint last - ((self layoutInset + self borderWidth + self width) @ 0).
tryToPlace
value: rightPoint value: false;
value: leftPoint value: false;
value: rightPoint value: true.!
tim Rowledge uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-tpr.1059.mcz
==================== Summary ====================
Name: Morphic-tpr.1059
Author: tpr
Time: 18 December 2015, 4:26:36.049 pm
UUID: ce2af9d7-dcb1-4225-8fea-1a0b3ae28ab4
Ancestors: Morphic-tpr.1058
When opening sub-menus with insufficient rightwards space on the Display we instead put them to the left of the parent. This change makes the leftward slide a bit smaller so that the mouse stays over menus was the user slides to the new menu; thus no strange closing of menus etc.
=============== Diff against Morphic-tpr.1058 ===============
Item was changed:
----- Method: MenuMorph>>popUpAdjacentTo:forHand:from: (in category 'control') -----
popUpAdjacentTo: rightOrLeftPoint forHand: hand from: sourceItem
"Present this menu at the given point under control of the given hand."
| tryToPlace selectedOffset rightPoint leftPoint |
hand world startSteppingSubmorphsOf: self.
popUpOwner := sourceItem.
self fullBounds.
self updateColor.
"ensure layout is current"
selectedOffset := (selectedItem
ifNil: [self items first]) position - self position.
tryToPlace := [:where :mustFit | | delta |
self position: where - selectedOffset.
delta := self boundsInWorld amountToTranslateWithin: sourceItem worldBounds.
(delta x = 0
or: [mustFit])
ifTrue: [delta = (0 @ 0)
ifFalse: [self position: self position + delta].
sourceItem world addMorphFront: self.
^ self]].
rightPoint := rightOrLeftPoint first + ((self layoutInset + self borderWidth) @ 0).
+ leftPoint := rightOrLeftPoint last + ((self layoutInset + self borderWidth - self width) @ 0).
- leftPoint := rightOrLeftPoint last - ((self layoutInset + self borderWidth + self width) @ 0).
tryToPlace
value: rightPoint value: false;
value: leftPoint value: false;
value: rightPoint value: true.!