# HG changeset patch # User Claus Gittinger # Date 1475152815 -7200 # Node ID 7b40b1cfbd33e897ec3d72e84f696a954c58fb97 # Parent 1c77c34d337c433c1c84159aca1a55c5aa535659 #REFACTORING by cg class: Tools::ChangeList code duplication diff -r 1c77c34d337c -r 7b40b1cfbd33 Tools__ChangeList.st --- a/Tools__ChangeList.st Thu Sep 29 14:39:34 2016 +0200 +++ b/Tools__ChangeList.st Thu Sep 29 14:40:15 2016 +0200 @@ -1,3 +1,5 @@ +"{ Encoding: utf8 }" + " COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague All Rights Reserved @@ -1539,37 +1541,7 @@ !ChangeList::ListEntry methodsFor:'displaying'! displayLabel:aLabel h:lH on:aGC x:newX y:y h:h - | list cx icon | - - list := self application. - cx := x := newX. - (list allowRemoveHolder value and:[list showRemovedHolder value]) ifTrue: [ - (icon := self iconRemoved) notNil ifTrue:[ - icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) - ]. - cx := cx + 22."experimental value - this looks good" - ]. - (icon := self iconDelta) notNil ifTrue:[ - icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) - ]. - cx := cx + 16."12 + 2px gap" - - super displayLabel:aLabel h:lH on:aGC x:cx y:y h:h. - -"/ "Now, display additional columns..." -"/ (list showColumn: #timestamp) ifTrue:[ -"/ cx := cx + (aLabel widthOn: aGC) + 5."px - padding" -"/ colS := change timeOfChangeIfKnown notNil -"/ ifTrue:[change timeOfChangeIfKnown printString] -"/ ifFalse:['???']. -"/ [ (colW := colS widthOn: aGC) > (aGC width - cx - 5) ] whileTrue:[ -"/ colS = '...' ifTrue:[ ^ self ]. -"/ colS := '...' , (colS copyFrom: 6). -"/ ]. -"/ super displayLabel:colS h:lH on:aGC x: (aGC width - 5 - colW) y:y h:h. -"/ ]. - - "Modified: / 27-07-2012 / 17:13:24 / Jan Vrany " + self displayLabel:aLabel h:lH on:aGC x:newX y:y h:h isHighlightedAsSelected:false ! displayLabel:aLabel h:lH on:aGC x:newX y:y h:h isHighlightedAsSelected:isHighlightedAsSelected