[FIX] diffsWithPrettyPrint fix

Ned Konz ned at bike-nomad.com
Mon Aug 27 20:49:17 UTC 2001


On Monday 27 August 2001 11:12 am, Doug Way wrote:
> The diffsWithPrettyPrint preference doesn't work in 3.1alpha-4282.  It
> works fine in 3.0.
>
> Perhaps it was broken when the prettyDiffs checkbox was added to the
> optionalButtons pane, but that's just a guess.

It looks like when the "what to show" stuff was added (which includes diffs 
and pretty diffs) the global flag was mostly ignored. This change set makes 
the Preferences flag (when set) affect all the diffs views in the 
CodeHolders, but if you have it set you can't see regular diffs any more. So 
you have a choice: either set the flag globally, or use the "what to show".

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com

--------------Boundary-00=_56VQ5WFFTMUGYBZR0AVD
Content-Type: text/x-smalltalk-changeset;
  charset="iso-8859-1";
  name="PrettyDiffFix-nk.2.cs"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="PrettyDiffFix-nk.2.cs"

'From Squeak3.1alpha of 7 March 2001 [latest update: #4282] on 27 August 2001 at 1:46:10 pm'!
"Change Set:		PrettyDiffFix-nk
Date:			27 August 2001
Author:			Ned Konz

This makes the Preferences flag diffsWithPrettyPrint
affect the showing of diffs in CodeHolders globally if it is set."!


!CodeHolder methodsFor: 'diffs' stamp: 'nk 8/27/2001 13:42'!
showingPrettyDiffs
	"Answer whether the receiver is showing pretty diffs of source code"

	^ contentsSymbol == #prettyDiffs or: [ Preferences valueOfFlag: #diffsWithPrettyPrint ].
! !


!TextDiffBuilder class methodsFor: 'instance creation' stamp: 'nk 8/27/2001 11:55'!
buildDisplayPatchFrom: srcString to: dstString inClass: srcClass 
	^ self
		buildDisplayPatchFrom: srcString
		to: dstString
		inClass: srcClass
		prettyDiffs: (Preferences valueOfFlag: #diffsWithPrettyPrint)! !


More information about the Squeak-dev mailing list