--- a/Tools__ChangeList.st Mon Apr 02 13:11:56 2012 +0100
+++ b/Tools__ChangeList.st Tue Apr 03 13:32:03 2012 +0100
@@ -28,8 +28,8 @@
"{ NameSpace: Tools }"
BrowserListWithFilter subclass:#ChangeList
- instanceVariableNames:'listHolder showRemovedHolder showSameHolder allowRemoveHolder
- allowAcceptHolder scrollToBottom'
+ instanceVariableNames:'listHolder showRemovedHolder showSameHolder showColumnSpecHolder
+ allowRemoveHolder allowAcceptHolder scrollToBottom'
classVariableNames:'LastSelectionConditionString'
poolDictionaries:''
category:'Interface-Browsers-ChangeSet'
@@ -320,11 +320,13 @@
#menuHolder
#outGeneratorHolder
#selectionHolder
+
#showRemovedHolder
#showSameHolder
+ #showColumnSpecHolder
).
- "Modified: / 11-02-2012 / 22:45:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 03-04-2012 / 11:47:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeList methodsFor:'accessing'!
@@ -477,6 +479,37 @@
^ listHolder
!
+showColumnSpecHolder
+ "return/create the 'showColumnSpecHolder' value holder (automatically generated)"
+
+ showColumnSpecHolder isNil ifTrue:[
+ showColumnSpecHolder := List with:#timestamp.
+ showColumnSpecHolder addDependent:self.
+ ].
+ ^ showColumnSpecHolder
+
+ "Modified: / 03-04-2012 / 11:49:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+showColumnSpecHolder:something
+ "set the 'showColumnSpecHolder' value holder (automatically generated)"
+
+ |oldValue newValue|
+
+ showColumnSpecHolder notNil ifTrue:[
+ oldValue := showColumnSpecHolder value.
+ showColumnSpecHolder removeDependent:self.
+ ].
+ showColumnSpecHolder := something.
+ showColumnSpecHolder notNil ifTrue:[
+ showColumnSpecHolder addDependent:self.
+ ].
+ newValue := showColumnSpecHolder value.
+ oldValue ~~ newValue ifTrue:[
+ self update:#value with:newValue from:showColumnSpecHolder.
+ ].
+!
+
showRemovedHolder
"return/create the 'showRemovedHolder' value holder (automatically generated)"
@@ -546,16 +579,25 @@
^self
].
sender == showSameHolder ifTrue:[
- self updateList
+ self updateList.
+ ^self.
].
sender == showRemovedHolder ifTrue:[
- self updateList
+ self updateList.
+ ^self.
+ ].
+ sender == showColumnSpecHolder ifTrue:[
+ listView notNil ifTrue:[
+ listView invalidate.
+ ].
+ ^self.
].
^super update: aspect with: param from: sender
"Created: / 24-10-2009 / 19:47:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified (format): / 27-12-2011 / 14:20:30 / cg"
+ "Modified: / 03-04-2012 / 11:27:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeList methodsFor:'event processing'!
@@ -911,6 +953,13 @@
[each change isMethodChange not
or:[each change isMethodCodeChange]]) ifFalse:[^false]].
^true
+!
+
+showColumn: columnSymbol
+
+ ^self showColumnSpecHolder value includes: columnSymbol.
+
+ "Created: / 03-04-2012 / 11:28:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeList::ListEntry class methodsFor:'instance creation'!
@@ -1075,20 +1124,32 @@
displayLabel:aLabel h:lH on:aGC x:newX y:y h:h
- | cx icon |
+ | list cx icon colW colS |
+ list := self application.
cx := x := newX.
- self application allowRemoveHolder value ifTrue:
+ list allowRemoveHolder value ifTrue:
[(icon := self iconRemoved) ifNotNil:
[icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) ].
cx := cx + 22."experimental value - this looks good"].
(icon := self iconDelta) ifNotNil:
[icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) ].
- cx := cx + 16."12 + 2px gap"
+ cx := cx + 16."12 + 2px gap"
+ super displayLabel:aLabel h:lH on:aGC x:cx y:y h:h.
- 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 := '...' , (colS copyFrom: 6).
+ ].
+ super displayLabel:colS h:lH on:aGC x: (aGC width - 5 - colW) y:y h:h.
+ ].
- "Modified: / 24-01-2012 / 21:44:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 03-04-2012 / 11:41:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ChangeList::ListEntry methodsFor:'private'!
@@ -1118,7 +1179,7 @@
!ChangeList class methodsFor:'documentation'!
version
- ^ '$Id: Tools__ChangeList.st 7961 2012-03-31 00:16:30Z vranyj1 $'
+ ^ '$Id: Tools__ChangeList.st 7963 2012-04-03 12:32:03Z vranyj1 $'
!
version_CVS
@@ -1126,5 +1187,5 @@
!
version_SVN
- ^ '$Id: Tools__ChangeList.st 7961 2012-03-31 00:16:30Z vranyj1 $'
+ ^ '$Id: Tools__ChangeList.st 7963 2012-04-03 12:32:03Z vranyj1 $'
! !