use Text instead of ColoredListEntry
authorClaus Gittinger <cg@exept.de>
Thu, 16 May 1996 12:48:09 +0200
changeset 544 dea45065e7f1
parent 543 6e4b59eda69a
child 545 99d0cac830ef
use Text instead of ColoredListEntry
DiffTextView.st
DiffTxtV.st
--- a/DiffTextView.st	Tue May 14 12:08:41 1996 +0200
+++ b/DiffTextView.st	Thu May 16 12:48:09 1996 +0200
@@ -160,27 +160,25 @@
 
     showSeparators := false.
 
-    useColors := ColoredListEntry notNil.
-    useColors ifTrue:[
-        device hasColors ifTrue:[
-            addedColor := Color black.
-            addedBgColor := Color green.
+    (useColors := device hasColors) ifTrue:[
+        addedColor := Color black.
+        addedBgColor := Color green.
 
-            removedColor := Color white.
-            removedBgColor := Color red.
+        removedColor := Color white.
+        removedBgColor := Color red.
 
-            changedColor := Color white.
-            changedBgColor := Color blue.
+        changedColor := Color white.
+        changedBgColor := Color blue.
 
-            changedSpacesOnlyColor := Color white.
-            changedSpacesOnlyBgColor := Color blue lightened.
-        ] ifFalse:[
-            addedBgColor := removedBgColor := changedBgColor := Color black.
-            addedColor := removedColor := changedColor := Color white.
-        ]
+        changedSpacesOnlyColor := Color white.
+        changedSpacesOnlyBgColor := Color blue lightened.
+    ] ifFalse:[
+        addedBgColor := removedBgColor := changedBgColor := Color black.
+        addedColor := removedColor := changedColor := Color white.
     ].
 
     "Created: 16.11.1995 / 16:59:48 / cg"
+    "Modified: 16.5.1996 / 12:40:19 / cg"
 ! !
 
 !DiffTextView methodsFor:'private'!
@@ -328,10 +326,16 @@
                         (l2 size >= idx1
                         and:[(s2 := l2 at:idx1) notNil
                              and:[s2 asString withoutSeparators = (text1 at:idx1) withoutSeparators]]) ifTrue:[
-                            l1 add:(ColoredListEntry string:(text1 at:idx1) foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
-                            l2 at:idx1 put:(ColoredListEntry string:(l2 at:idx1) asString foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
+                            l1 add:(Text string:(text1 at:idx1) 
+                                         foregroundColor:changedSpacesOnlyColor
+                                         backgroundColor:changedSpacesOnlyBgColor).
+                            l2 at:idx1 put:(Text string:(l2 at:idx1) asString 
+                                                 foregroundColor:changedSpacesOnlyColor 
+                                                 backgroundColor:changedSpacesOnlyBgColor).
                         ] ifFalse:[
-                            l1 add:(ColoredListEntry string:(text1 at:idx1) foregroundColor:changedColor backgroundColor:changedBgColor).
+                            l1 add:(Text string:(text1 at:idx1) 
+                                         foregroundColor:changedColor 
+                                         backgroundColor:changedBgColor).
                         ]
                     ] ifFalse:[
                         l1 add:(text1 at:idx1).
@@ -343,10 +347,10 @@
                             (l1 size >= idx2
                             and:[(s1 := l1 at:idx2) notNil
                                 and:[s1 asString withoutSeparators = (text2 at:idx2) withoutSeparators]]) ifTrue:[
-                                l2 add:(ColoredListEntry string:(text2 at:idx2) foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
-                                l1 at:idx2 put:(ColoredListEntry string:(l1 at:idx2) asString foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
+                                l2 add:(Text string:(text2 at:idx2) foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
+                                l1 at:idx2 put:(Text string:(l1 at:idx2) asString foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
                             ] ifFalse:[
-                                l2 add:(ColoredListEntry string:(text2 at:idx2) foregroundColor:changedColor backgroundColor:changedBgColor)
+                                l2 add:(Text string:(text2 at:idx2) foregroundColor:changedColor backgroundColor:changedBgColor)
                             ]
                         ] ifFalse:[
                             l2 add:(text2 at:idx2).
@@ -364,7 +368,7 @@
                 state == #added ifTrue:[
                     (entry at:1) == $> ifTrue:[
                         useColors ifTrue:[
-                            l2 add:(ColoredListEntry string:(text2 at:idx2) foregroundColor:addedColor backgroundColor:addedBgColor )
+                            l2 add:(Text string:(text2 at:idx2) foregroundColor:addedColor backgroundColor:addedBgColor )
                         ] ifFalse:[
                             l2 add:(text2 at:idx2).
                         ].
@@ -378,7 +382,7 @@
                     state == #deleted ifTrue:[
                         (entry at:1) == $< ifTrue:[
                             useColors ifTrue:[
-                                l1 add:(ColoredListEntry string:(text1 at:idx1) foregroundColor:removedColor backgroundColor:removedBgColor ).
+                                l1 add:(Text string:(text1 at:idx1) foregroundColor:removedColor backgroundColor:removedBgColor ).
                             ] ifFalse:[
                                 l1 add:(text1 at:idx1).
                             ].
@@ -404,10 +408,10 @@
     textView1 list:l1.
     textView2 list:l2
 
-    "Modified: 25.4.1996 / 13:29:53 / cg"
+    "Modified: 16.5.1996 / 12:38:49 / cg"
 ! !
 
 !DiffTextView class methodsFor:'documentation'!
 
 version
-^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.18 1996-05-08 15:00:32 cg Exp $'! !
+^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.19 1996-05-16 10:48:09 cg Exp $'! !
--- a/DiffTxtV.st	Tue May 14 12:08:41 1996 +0200
+++ b/DiffTxtV.st	Thu May 16 12:48:09 1996 +0200
@@ -160,27 +160,25 @@
 
     showSeparators := false.
 
-    useColors := ColoredListEntry notNil.
-    useColors ifTrue:[
-        device hasColors ifTrue:[
-            addedColor := Color black.
-            addedBgColor := Color green.
+    (useColors := device hasColors) ifTrue:[
+        addedColor := Color black.
+        addedBgColor := Color green.
 
-            removedColor := Color white.
-            removedBgColor := Color red.
+        removedColor := Color white.
+        removedBgColor := Color red.
 
-            changedColor := Color white.
-            changedBgColor := Color blue.
+        changedColor := Color white.
+        changedBgColor := Color blue.
 
-            changedSpacesOnlyColor := Color white.
-            changedSpacesOnlyBgColor := Color blue lightened.
-        ] ifFalse:[
-            addedBgColor := removedBgColor := changedBgColor := Color black.
-            addedColor := removedColor := changedColor := Color white.
-        ]
+        changedSpacesOnlyColor := Color white.
+        changedSpacesOnlyBgColor := Color blue lightened.
+    ] ifFalse:[
+        addedBgColor := removedBgColor := changedBgColor := Color black.
+        addedColor := removedColor := changedColor := Color white.
     ].
 
     "Created: 16.11.1995 / 16:59:48 / cg"
+    "Modified: 16.5.1996 / 12:40:19 / cg"
 ! !
 
 !DiffTextView methodsFor:'private'!
@@ -328,10 +326,16 @@
                         (l2 size >= idx1
                         and:[(s2 := l2 at:idx1) notNil
                              and:[s2 asString withoutSeparators = (text1 at:idx1) withoutSeparators]]) ifTrue:[
-                            l1 add:(ColoredListEntry string:(text1 at:idx1) foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
-                            l2 at:idx1 put:(ColoredListEntry string:(l2 at:idx1) asString foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
+                            l1 add:(Text string:(text1 at:idx1) 
+                                         foregroundColor:changedSpacesOnlyColor
+                                         backgroundColor:changedSpacesOnlyBgColor).
+                            l2 at:idx1 put:(Text string:(l2 at:idx1) asString 
+                                                 foregroundColor:changedSpacesOnlyColor 
+                                                 backgroundColor:changedSpacesOnlyBgColor).
                         ] ifFalse:[
-                            l1 add:(ColoredListEntry string:(text1 at:idx1) foregroundColor:changedColor backgroundColor:changedBgColor).
+                            l1 add:(Text string:(text1 at:idx1) 
+                                         foregroundColor:changedColor 
+                                         backgroundColor:changedBgColor).
                         ]
                     ] ifFalse:[
                         l1 add:(text1 at:idx1).
@@ -343,10 +347,10 @@
                             (l1 size >= idx2
                             and:[(s1 := l1 at:idx2) notNil
                                 and:[s1 asString withoutSeparators = (text2 at:idx2) withoutSeparators]]) ifTrue:[
-                                l2 add:(ColoredListEntry string:(text2 at:idx2) foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
-                                l1 at:idx2 put:(ColoredListEntry string:(l1 at:idx2) asString foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
+                                l2 add:(Text string:(text2 at:idx2) foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
+                                l1 at:idx2 put:(Text string:(l1 at:idx2) asString foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
                             ] ifFalse:[
-                                l2 add:(ColoredListEntry string:(text2 at:idx2) foregroundColor:changedColor backgroundColor:changedBgColor)
+                                l2 add:(Text string:(text2 at:idx2) foregroundColor:changedColor backgroundColor:changedBgColor)
                             ]
                         ] ifFalse:[
                             l2 add:(text2 at:idx2).
@@ -364,7 +368,7 @@
                 state == #added ifTrue:[
                     (entry at:1) == $> ifTrue:[
                         useColors ifTrue:[
-                            l2 add:(ColoredListEntry string:(text2 at:idx2) foregroundColor:addedColor backgroundColor:addedBgColor )
+                            l2 add:(Text string:(text2 at:idx2) foregroundColor:addedColor backgroundColor:addedBgColor )
                         ] ifFalse:[
                             l2 add:(text2 at:idx2).
                         ].
@@ -378,7 +382,7 @@
                     state == #deleted ifTrue:[
                         (entry at:1) == $< ifTrue:[
                             useColors ifTrue:[
-                                l1 add:(ColoredListEntry string:(text1 at:idx1) foregroundColor:removedColor backgroundColor:removedBgColor ).
+                                l1 add:(Text string:(text1 at:idx1) foregroundColor:removedColor backgroundColor:removedBgColor ).
                             ] ifFalse:[
                                 l1 add:(text1 at:idx1).
                             ].
@@ -404,10 +408,10 @@
     textView1 list:l1.
     textView2 list:l2
 
-    "Modified: 25.4.1996 / 13:29:53 / cg"
+    "Modified: 16.5.1996 / 12:38:49 / cg"
 ! !
 
 !DiffTextView class methodsFor:'documentation'!
 
 version
-^ '$Header: /cvs/stx/stx/libtool/Attic/DiffTxtV.st,v 1.18 1996-05-08 15:00:32 cg Exp $'! !
+^ '$Header: /cvs/stx/stx/libtool/Attic/DiffTxtV.st,v 1.19 1996-05-16 10:48:09 cg Exp $'! !