[squeak-dev] The Trunk: Morphic-cmm.756.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Feb 1 19:06:50 UTC 2015


Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.756.mcz

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

Name: Morphic-cmm.756
Author: cmm
Time: 1 February 2015, 1:06:11.045 pm
UUID: c1553853-472d-45ca-a182-c07497c6f7a9
Ancestors: Morphic-cmm.755

- Present the comparison to clipboard text from the context of paste-modification, since that is what the user is determining whether to do with the clipboard contents.
- Make the same change to ParagraphEditor, for consistency.

=============== Diff against Morphic-cmm.755 ===============

Item was changed:
  ----- Method: TextEditor>>compareToClipboard (in category 'menu messages') -----
  compareToClipboard
+ 	"If any text is selected, present the modifications that would be made to it if the clipboard contents were pasted over it.  If no text is selected, present the differences betwen the entire pane's contents and the clipboard text."
+ 	| subjectText proposedText |
+ 	subjectText := self selection string ifEmpty: [ paragraph text string ].
+ 	proposedText := self clipboardText string.
+ 	subjectText = proposedText ifTrue: [^ self inform: 'Exact match'].
+ 	(StringHolder new 
+ 		textContents:
+ 			(TextDiffBuilder
+ 				buildDisplayPatchFrom: subjectText 
+ 				to: proposedText)) openLabel: 'Differences with Clipboard Text'!
- 	"Check to see if whether the receiver's text is the same as the text currently on the clipboard, and inform the user."
- 	| s1 s2 |
- 	s1 := self clipboardText string.
- 	s2 := self selection string.
- 	s1 = s2 ifTrue: [^ self inform: 'Exact match'].
- 
- 	(StringHolder new textContents:
- 		(TextDiffBuilder buildDisplayPatchFrom: s1 to: s2))
- 		openLabel: 'Comparison to Clipboard Text'!



More information about the Squeak-dev mailing list