130 Tools::ChangeList open |
130 Tools::ChangeList open |
131 " |
131 " |
132 |
132 |
133 <resource: #canvas> |
133 <resource: #canvas> |
134 |
134 |
135 ^ |
135 ^ |
136 #(FullSpec |
136 #(FullSpec |
137 name: windowSpec |
137 name: windowSpec |
138 window: |
138 window: |
139 (WindowSpec |
139 (WindowSpec |
140 label: 'Change List' |
140 label: 'Change List' |
141 name: 'Change List' |
141 name: 'Change List' |
142 min: (Point 10 10) |
142 min: (Point 10 10) |
143 bounds: (Rectangle 0 0 300 300) |
143 bounds: (Rectangle 0 0 300 300) |
144 ) |
144 ) |
145 component: |
145 component: |
146 (SpecCollection |
146 (SpecCollection |
147 collection: ( |
147 collection: ( |
148 (SelectionInListModelViewSpec |
148 (InputFieldSpec |
149 name: 'List' |
149 name: 'Filter' |
150 layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
150 layout: (LayoutFrame 0 0 0 0 0 1 25 0) |
151 model: selectionHolder |
151 initiallyInvisible: true |
152 menu: menuHolderWithShowFilter |
152 model: filterPatternHolder |
153 hasHorizontalScrollBar: true |
153 immediateAccept: true |
154 hasVerticalScrollBar: true |
154 acceptOnLeave: false |
155 listModel: listHolder |
155 acceptOnReturn: false |
156 multipleSelectOk: true |
156 acceptOnTab: false |
157 useIndex: false |
157 acceptOnPointerLeave: false |
158 highlightMode: line |
158 emptyFieldReplacementText: 'Search Filter...' |
159 doubleClickSelector: selectionDoubleclicked |
159 postBuildCallback: postBuildFilterView: |
160 postBuildCallback: postBuildListView: |
160 ) |
161 ) |
161 (DataSetSpec |
162 (InputFieldSpec |
162 name: 'List' |
163 name: 'Filter' |
163 layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
164 layout: (LayoutFrame 0 0 0 0 0 1 26 0) |
164 model: selectionHolder |
165 initiallyInvisible: true |
165 menu: menuHolderWithShowFilter |
166 model: filterPatternHolder |
166 hasHorizontalScrollBar: true |
167 immediateAccept: true |
167 hasVerticalScrollBar: true |
168 acceptOnLeave: false |
168 dataList: listHolder |
169 acceptOnReturn: false |
169 useIndex: false |
170 acceptOnTab: false |
170 doubleClickSelector: selectionDoubleclicked |
171 acceptOnPointerLeave: false |
171 columnHolder: listColumns |
172 emptyFieldReplacementText: 'Search Filter...' |
172 showLabels: false |
173 usePreferredHeight: true |
173 multipleSelectOk: true |
174 useDynamicPreferredHeight: true |
174 postBuildCallback: postBuildListView: |
175 postBuildCallback: postBuildFilterView: |
175 properties: |
176 ) |
176 (PropertyListDictionary |
177 ) |
177 startDragSelector: nil |
178 |
178 dropObjectSelector: dragObjects: |
179 ) |
179 canDropSelector: canDrop: |
|
180 dropSelector: dropObjects: |
|
181 ) |
|
182 ) |
|
183 ) |
|
184 |
|
185 ) |
180 ) |
186 ) |
181 |
187 ! ! |
182 "Modified: / 29-11-2011 / 15:52:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
188 |
|
189 !ChangeList class methodsFor:'list specs'! |
|
190 |
|
191 listColumnSpec |
|
192 "This resource specification was automatically generated |
|
193 by the DataSetBuilder of ST/X." |
|
194 |
|
195 "Do not manually edit this!! If it is corrupted, |
|
196 the DataSetBuilder may not be able to read the specification." |
|
197 |
|
198 " |
|
199 DataSetBuilder new openOnClass:Tools::ChangeList andSelector:#listColumnSpec |
|
200 " |
|
201 |
|
202 <resource: #tableColumns> |
|
203 |
|
204 ^#( |
|
205 (DataSetColumnSpec |
|
206 label: 'Removed' |
|
207 id: 'removed' |
|
208 labelButtonType: Button |
|
209 width: 20 |
|
210 minWidth: 20 |
|
211 editorType: CheckToggle |
|
212 rendererType: CheckToggle |
|
213 model: notRemoved |
|
214 menuFromApplication: false |
|
215 printSelector: notRemoved |
|
216 isResizeable: false |
|
217 showRowSeparator: false |
|
218 showSelectionHighLighted: false |
|
219 showColSeparator: false |
|
220 ) |
|
221 (DataSetColumnSpec |
|
222 label: 'Delta' |
|
223 id: 'delta' |
|
224 labelButtonType: Button |
|
225 width: 20 |
|
226 minWidth: 20 |
|
227 menuFromApplication: false |
|
228 printSelector: iconDelta |
|
229 canSelect: false |
|
230 isResizeable: false |
|
231 showRowSeparator: false |
|
232 showSelectionHighLighted: false |
|
233 showColSeparator: false |
|
234 ) |
|
235 (DataSetColumnSpec |
|
236 label: 'Change' |
|
237 id: change |
|
238 labelAlignment: left |
|
239 labelButtonType: Button |
|
240 menuFromApplication: false |
|
241 printSelector: label |
|
242 canSelect: false |
|
243 showRowSeparator: false |
|
244 showColSeparator: false |
|
245 ) |
|
246 (DataSetColumnSpec |
|
247 label: 'Class' |
|
248 id: 'className' |
|
249 labelAlignment: left |
|
250 activeHelpKey: '' |
|
251 activeHelpKeyForLabel: '' |
|
252 labelButtonType: Button |
|
253 usePreferredWidth: true |
|
254 model: className |
|
255 menuFromApplication: false |
|
256 canSelect: false |
|
257 showRowSeparator: false |
|
258 showColSeparator: false |
|
259 ) |
|
260 (DataSetColumnSpec |
|
261 label: 'Selector' |
|
262 id: 'selector' |
|
263 labelAlignment: left |
|
264 activeHelpKey: '' |
|
265 activeHelpKeyForLabel: '' |
|
266 labelButtonType: Button |
|
267 usePreferredWidth: true |
|
268 model: selector |
|
269 menuFromApplication: false |
|
270 canSelect: false |
|
271 showRowSeparator: false |
|
272 showColSeparator: false |
|
273 ) |
|
274 (DataSetColumnSpec |
|
275 label: 'Category' |
|
276 id: category |
|
277 labelAlignment: left |
|
278 labelButtonType: Button |
|
279 usePreferredWidth: true |
|
280 model: category |
|
281 menuFromApplication: false |
|
282 canSelect: false |
|
283 showRowSeparator: false |
|
284 showColSeparator: false |
|
285 ) |
|
286 (DataSetColumnSpec |
|
287 label: 'Time Stamp' |
|
288 id: timeStamp |
|
289 labelAlignment: left |
|
290 labelButtonType: Button |
|
291 usePreferredWidth: true |
|
292 model: timeStamp |
|
293 menuFromApplication: false |
|
294 canSelect: false |
|
295 showRowSeparator: false |
|
296 showColSeparator: false |
|
297 ) |
|
298 ) |
|
299 |
183 ! ! |
300 ! ! |
184 |
301 |
185 !ChangeList class methodsFor:'menu specs'! |
302 !ChangeList class methodsFor:'menu specs'! |
186 |
303 |
187 listMenu |
304 listMenu |
561 ]. |
709 ]. |
562 newValue := showSameHolder value. |
710 newValue := showSameHolder value. |
563 oldValue ~~ newValue ifTrue:[ |
711 oldValue ~~ newValue ifTrue:[ |
564 self update:#value with:newValue from:showSameHolder. |
712 self update:#value with:newValue from:showSameHolder. |
565 ]. |
713 ]. |
|
714 ! |
|
715 |
|
716 showTimestampHolder |
|
717 "return/create the 'showTimestampHolder' value holder (automatically generated)" |
|
718 |
|
719 showTimestampHolder isNil ifTrue:[ |
|
720 showTimestampHolder := ValueHolder new. |
|
721 showTimestampHolder addDependent:self. |
|
722 ]. |
|
723 ^ showTimestampHolder |
|
724 ! |
|
725 |
|
726 showTimestampHolder:something |
|
727 "set the 'showTimestampHolder' value holder (automatically generated)" |
|
728 |
|
729 |oldValue newValue| |
|
730 |
|
731 showTimestampHolder notNil ifTrue:[ |
|
732 oldValue := showTimestampHolder value. |
|
733 showTimestampHolder removeDependent:self. |
|
734 ]. |
|
735 showTimestampHolder := something. |
|
736 showTimestampHolder notNil ifTrue:[ |
|
737 showTimestampHolder addDependent:self. |
|
738 ]. |
|
739 newValue := showTimestampHolder value. |
|
740 oldValue ~~ newValue ifTrue:[ |
|
741 self update:#value with:newValue from:showTimestampHolder. |
|
742 ]. |
566 ! ! |
743 ! ! |
567 |
744 |
568 !ChangeList methodsFor:'change & update'! |
745 !ChangeList methodsFor:'change & update'! |
569 |
746 |
570 selectionChanged |
747 selectionChanged |
571 super selectionChanged |
748 super selectionChanged |
572 ! |
749 ! |
573 |
750 |
574 update: aspect with: param from: sender |
751 update: aspect with: param from: sender |
|
752 |
|
753 sender == allowRemoveHolder ifTrue:[ |
|
754 self listColumn: #removed visible: allowRemoveHolder value. |
|
755 ^self. |
|
756 ]. |
|
757 |
|
758 sender == showTimestampHolder ifTrue:[ |
|
759 self listColumn: #timeStamp visible: showTimestampHolder value. |
|
760 ^self. |
|
761 ]. |
|
762 |
575 |
763 |
576 sender == selectionHolder ifTrue:[ |
764 sender == selectionHolder ifTrue:[ |
577 self selectionChanged. |
765 self selectionChanged. |
578 ^ self |
766 ^ self |
579 ]. |
767 ]. |
580 sender == showSameHolder ifTrue:[ |
768 sender == showSameHolder ifTrue:[ |
581 self updateList |
769 self updateList. |
|
770 ^self. |
582 ]. |
771 ]. |
583 sender == showRemovedHolder ifTrue:[ |
772 sender == showRemovedHolder ifTrue:[ |
584 self updateList |
773 self updateList |
585 ]. |
774 ]. |
586 sender == showConflictsOnlyHolder ifTrue:[ |
775 sender == showConflictsOnlyHolder ifTrue:[ |
589 |
778 |
590 ^super update: aspect with: param from: sender |
779 ^super update: aspect with: param from: sender |
591 |
780 |
592 "Created: / 24-10-2009 / 19:47:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
781 "Created: / 24-10-2009 / 19:47:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
593 "Modified (format): / 27-12-2011 / 14:20:30 / cg" |
782 "Modified (format): / 27-12-2011 / 14:20:30 / cg" |
|
783 "Modified: / 26-07-2012 / 18:44:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
784 ! ! |
|
785 |
|
786 !ChangeList methodsFor:'drag & drop'! |
|
787 |
|
788 canDrop: aDropContext |
|
789 |
|
790 ^(self inGeneratorHolder value isKindOf: Iterator) not |
|
791 and:[aDropContext dropObjects allSatisfy:[:obj|(obj theObject isKindOf: Change)]]. |
|
792 |
|
793 "Created: / 01-08-2012 / 17:53:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
794 ! |
|
795 |
|
796 dragObjects: aDropSource |
|
797 |
|
798 ^self selection collect:[:item|(DropObject new: item change) displayObject: (item labelAndIcon)] |
|
799 |
|
800 "Created: / 01-08-2012 / 17:50:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
801 ! |
|
802 |
|
803 dropObjects:aDropContext |
|
804 "drop manager wants to drop. |
|
805 This is ony sent, if #canDrop: returned true. |
|
806 Must be redefined in order for drop to work." |
|
807 |
|
808 | changes | |
|
809 |
|
810 changes := self inGeneratorHolder value. |
|
811 aDropContext dropObjects do:[:obj|changes add: obj theObject]. |
|
812 self inGeneratorHolder changed: #value |
|
813 |
|
814 "Modified: / 01-08-2012 / 18:15:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
594 ! ! |
815 ! ! |
595 |
816 |
596 !ChangeList methodsFor:'event processing'! |
817 !ChangeList methodsFor:'event processing'! |
597 |
818 |
598 buttonPress:button x:x y:y view:aView |
819 buttonPress:button x:x y:y view:aView |
895 sym = #= ifTrue:[^#iconEqual]. |
1114 sym = #= ifTrue:[^#iconEqual]. |
896 "/ different. |
1115 "/ different. |
897 ^ nil. |
1116 ^ nil. |
898 ! |
1117 ! |
899 |
1118 |
|
1119 listColumn: columnId visible: visible |
|
1120 visible ifTrue:[ |
|
1121 self listColumnShow: columnId |
|
1122 ] ifFalse:[ |
|
1123 self listColumnHide: columnId |
|
1124 ] |
|
1125 |
|
1126 "Created: / 26-07-2012 / 18:20:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1127 ! |
|
1128 |
|
1129 listColumnHide: columnId |
|
1130 self listColumns do:[:spec| |
|
1131 spec id = columnId ifTrue:[ |
|
1132 self listColumns remove: spec. |
|
1133 listView notNil ifTrue:[ |
|
1134 listView invalidate. |
|
1135 ]. |
|
1136 ^self |
|
1137 ]. |
|
1138 ] |
|
1139 |
|
1140 "Created: / 26-07-2012 / 18:19:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1141 ! |
|
1142 |
|
1143 listColumnShow: columnId |
|
1144 |
|
1145 | columns | |
|
1146 columns := self listColumns. |
|
1147 |
|
1148 columns do:[:spec| |
|
1149 spec id = columnId ifTrue:[ |
|
1150 ^self. |
|
1151 ] |
|
1152 ]. |
|
1153 |
|
1154 self class listColumnSpec do:[:specArray| |
|
1155 | spec | |
|
1156 |
|
1157 spec := specArray decodeAsLiteralArray. |
|
1158 spec id = columnId ifTrue:[ |
|
1159 columnId == #removed ifTrue:[ |
|
1160 columns addFirst: spec. |
|
1161 ] ifFalse:[ |
|
1162 columns add: spec. |
|
1163 ]. |
|
1164 listView notNil ifTrue:[ |
|
1165 listView invalidate. |
|
1166 ]. |
|
1167 ^self. |
|
1168 ] |
|
1169 |
|
1170 ]. |
|
1171 |
|
1172 "Created: / 26-07-2012 / 17:56:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1173 ! |
|
1174 |
900 listEntryFor:chg |
1175 listEntryFor:chg |
901 ^ListEntry change:chg application: self |
1176 ^ListEntry change:chg application: self |
902 |
1177 |
903 "Modified: / 05-12-2009 / 14:39:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1178 "Modified: / 05-12-2009 / 14:39:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
904 ! |
1179 ! |
919 |
1194 |
920 "Created: / 05-12-2009 / 14:14:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1195 "Created: / 05-12-2009 / 14:14:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
921 ! |
1196 ! |
922 |
1197 |
923 updateList |
1198 updateList |
924 |inGenerator changeset newList| |
1199 |inGenerator changeset firstLineShown oldSel newList newSel | |
925 |
|
926 self withWaitCursorDo:[ |
1200 self withWaitCursorDo:[ |
927 inGenerator := self inGeneratorHolder value. |
1201 inGenerator := self inGeneratorHolder value. |
928 changeset := inGenerator ifNil:[ #() ] ifNotNil:[ inGenerator ]. |
1202 listView notNil ifTrue:[ |
929 self showConflictsOnlyHolder value ifTrue:[ |
1203 ((listView isKindOf: ScrollableView) not or:[listView scrolledView notNil]) ifTrue:[ |
930 newList := changeset select: [:chg | |
1204 firstLineShown := listView firstLineShown |
931 chg isConflict |
1205 ]. |
932 ]. |
|
933 ] ifFalse:[ |
|
934 | showRemoved showSame | |
|
935 |
|
936 showRemoved := self showRemovedHolder value. |
|
937 showSame := self showSameHolder value. |
|
938 |
|
939 newList := changeset select: [:chg | |
|
940 (showRemoved or:[ chg removed not ]) |
|
941 and:[showSame or:[chg delta ~~ #=]] |
|
942 ]. |
|
943 ]. |
1206 ]. |
|
1207 oldSel := self selection. |
|
1208 |
|
1209 changeset := inGenerator isNil ifTrue:[ #() ] ifFalse:[ inGenerator ]. |
|
1210 newList := changeset |
|
1211 select: |
|
1212 [:chg | |
|
1213 (self showRemovedHolder value or:[ chg removed not ]) |
|
1214 and:[self showSameHolder value or:[chg delta ~~ #=]] |
|
1215 ]. |
944 newList := self filterList: newList. |
1216 newList := self filterList: newList. |
945 newList := newList collect:[:chg | self listEntryFor:chg ]. |
1217 newList := newList collect:[:chg | self listEntryFor:chg ]. |
946 self listHolder value ~= newList ifTrue:[ |
1218 self listHolder value ~= newList ifTrue:[ |
947 self listHolder value: newList. |
1219 self listHolder value: newList. |
|
1220 ((newList size ~~ 0) and:[scrollToBottom]) ifTrue:[ |
|
1221 self selection: { newList last } |
|
1222 ] ifFalse:[ |
|
1223 oldSel notEmptyOrNil ifTrue:[ |
|
1224 newSel := OrderedCollection new: oldSel size. |
|
1225 oldSel := oldSel reject:[:e|e isNil]. |
|
1226 oldSel := oldSel collect:[:e|e change]. |
|
1227 newList do:[:e|(oldSel includes:e change) ifTrue:[newSel add:e]]. |
|
1228 self selection: newSel. |
|
1229 ]. |
|
1230 (listView notNil and:[firstLineShown notNil]) ifTrue:[ |
|
1231 listView scrollToLine: (newList size min: firstLineShown). |
|
1232 ]. |
|
1233 ]. |
|
1234 scrollToBottom := false. |
|
1235 |
948 ] |
1236 ] |
949 ] |
1237 ] |
950 |
|
951 "Modified: / 29-11-2011 / 15:38:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
952 "Modified: / 28-12-2011 / 15:46:15 / cg" |
1238 "Modified: / 28-12-2011 / 15:46:15 / cg" |
|
1239 "Modified: / 01-08-2012 / 18:10:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
953 ! ! |
1240 ! ! |
954 |
1241 |
955 !ChangeList methodsFor:'queries'! |
1242 !ChangeList methodsFor:'queries'! |
956 |
1243 |
957 hasChangeSelected |
1244 hasChangeSelected |
1110 |
1411 |
1111 label |
1412 label |
1112 | label | |
1413 | label | |
1113 |
1414 |
1114 label := change displayString. |
1415 label := change displayString. |
|
1416 |
|
1417 "Hack: if the printString contains multiple lines, then |
|
1418 if there are just 2 lines, then merge them, otherwise add |
|
1419 ... to the first line" |
|
1420 (label includes: Character cr) ifTrue:[ |
|
1421 | firstCR secondCR | |
|
1422 firstCR := label indexOf: Character cr. |
|
1423 firstCR ~~ label size ifTrue:[ |
|
1424 secondCR := label indexOf: Character cr startingAt: firstCR + 1. |
|
1425 ]. |
|
1426 secondCR isNil ifTrue:[ |
|
1427 "/2 lines only |
|
1428 label := label copy at: firstCR put: Character space. |
|
1429 ] ifFalse:[ |
|
1430 label := (label copyTo: firstCR - 1) , '...' |
|
1431 ]. |
|
1432 ]. |
1115 self removed ifTrue:[label := label asText colorizeAllWith: Color gray]. |
1433 self removed ifTrue:[label := label asText colorizeAllWith: Color gray]. |
1116 ^label |
1434 ^label |
1117 |
1435 |
1118 "Created: / 05-11-2008 / 08:20:02 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1436 "Created: / 05-11-2008 / 08:20:02 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1119 "Modified: / 25-07-2009 / 23:43:23 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1437 "Modified: / 25-07-2009 / 23:43:23 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1120 "Modified: / 05-12-2009 / 14:46:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1438 "Modified: / 05-12-2009 / 14:46:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1121 "Modified (format): / 27-07-2012 / 21:26:34 / cg" |
1439 "Modified (format): / 27-07-2012 / 21:26:34 / cg" |
1122 ! |
1440 ! |
1123 |
1441 |
|
1442 labelAndIcon |
|
1443 ^(LabelAndIcon label: self label icon: self iconDelta) |
|
1444 |
|
1445 "Created: / 01-08-2012 / 18:14:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1446 ! |
|
1447 |
|
1448 notRemoved |
|
1449 ^ self removed not |
|
1450 |
|
1451 "Created: / 26-07-2012 / 18:31:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1452 ! |
|
1453 |
|
1454 notRemoved: aBoolean |
|
1455 ^ self removed: aBoolean not |
|
1456 |
|
1457 "Created: / 26-07-2012 / 18:31:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1458 ! |
|
1459 |
1124 removed |
1460 removed |
1125 ^ change removed |
1461 ^ change removed == true |
|
1462 |
|
1463 "Modified: / 26-07-2012 / 18:30:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1126 ! |
1464 ! |
1127 |
1465 |
1128 removed:aBoolean |
1466 removed:aBoolean |
1129 change removed: aBoolean. |
1467 change removed: aBoolean. |
1130 ! |
1468 ! |
1132 source |
1470 source |
1133 |
1471 |
1134 ^change source |
1472 ^change source |
1135 ! |
1473 ! |
1136 |
1474 |
|
1475 timeStamp |
|
1476 ^change timeOfChangeIfKnown |
|
1477 |
|
1478 "Created: / 26-07-2012 / 18:38:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1479 ! |
|
1480 |
1137 x |
1481 x |
1138 ^ x |
1482 ^ x |
1139 ! ! |
1483 ! ! |
1140 |
1484 |
1141 !ChangeList::ListEntry methodsFor:'displaying'! |
1485 !ChangeList::ListEntry methodsFor:'displaying'! |
1142 |
1486 |
1143 displayLabel:aLabel h:lH on:aGC x:newX y:y h:h |
1487 displayLabel:aLabel h:lH on:aGC x:newX y:y h:h |
1144 | cx icon | |
1488 |
1145 |
1489 | list cx icon colW colS | |
|
1490 list := self application. |
1146 cx := x := newX. |
1491 cx := x := newX. |
1147 self application allowRemoveHolder value ifTrue:[ |
1492 (list allowRemoveHolder value and:[list showRemovedHolder value]) ifTrue: [ |
1148 (icon := self iconRemoved) notNil ifTrue:[ |
1493 (icon := self iconRemoved) notNil ifTrue:[ |
1149 icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) |
1494 icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) |
1150 ]. |
1495 ]. |
1151 cx := cx + 22."experimental value - this looks good" |
1496 cx := cx + 22."experimental value - this looks good" |
1152 ]. |
1497 ]. |
1153 (icon := self iconDelta) notNil ifTrue:[ |
1498 (icon := self iconDelta) notNil ifTrue:[ |
1154 icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) |
1499 icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) |
1155 ]. |
1500 ]. |
1156 cx := cx + 16."12 + 2px gap" |
1501 cx := cx + 16."12 + 2px gap" |
1157 |
1502 |
1158 super displayLabel:aLabel h:lH on:aGC x:cx y:y h:h |
1503 super displayLabel:aLabel h:lH on:aGC x:cx y:y h:h. |
1159 |
1504 |
1160 "Modified: / 24-01-2012 / 21:44:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1505 "/ "Now, display additional columns..." |
1161 "Modified: / 27-07-2012 / 21:26:23 / cg" |
1506 "/ (list showColumn: #timestamp) ifTrue:[ |
|
1507 "/ cx := cx + (aLabel widthOn: aGC) + 5."px - padding" |
|
1508 "/ colS := change timeOfChangeIfKnown notNil |
|
1509 "/ ifTrue:[change timeOfChangeIfKnown printString] |
|
1510 "/ ifFalse:['???']. |
|
1511 "/ [ (colW := colS widthOn: aGC) > (aGC width - cx - 5) ] whileTrue:[ |
|
1512 "/ colS = '...' ifTrue:[ ^ self ]. |
|
1513 "/ colS := '...' , (colS copyFrom: 6). |
|
1514 "/ ]. |
|
1515 "/ super displayLabel:colS h:lH on:aGC x: (aGC width - 5 - colW) y:y h:h. |
|
1516 "/ ]. |
|
1517 |
|
1518 "Modified: / 27-07-2012 / 17:13:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1162 ! |
1519 ! |
1163 |
1520 |
1164 iconDelta |
1521 iconDelta |
1165 | iconSelector | |
1522 | iconSelector | |
1166 |
1523 |