author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 10 May 2015 05:53:16 +0100 | |
branch | jv |
changeset 995 | 92bb466548a9 |
parent 579 | 76eef5d694b4 |
child 1121 | c5661215109c |
permissions | -rw-r--r-- |
120 | 1 |
"{ Package: 'stx:goodies/monticello' }" |
2 |
||
995
92bb466548a9
Removed test classes from stx:goodies/monticello - they're in tests sub package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
579
diff
changeset
|
3 |
"{ NameSpace: Smalltalk }" |
92bb466548a9
Removed test classes from stx:goodies/monticello - they're in tests sub package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
579
diff
changeset
|
4 |
|
120 | 5 |
MCPatchBrowser subclass:#MCChangeSelector |
6 |
instanceVariableNames:'kept' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
579 | 9 |
category:'SCM-Monticello-UI' |
120 | 10 |
! |
11 |
||
12 |
||
13 |
!MCChangeSelector methodsFor:'as yet unclassified'! |
|
14 |
||
15 |
buttonSpecs |
|
16 |
^ #((Select select 'Select these changes') |
|
17 |
(Cancel cancel 'Cancel the operation') |
|
18 |
) |
|
19 |
! |
|
20 |
||
21 |
cancel |
|
22 |
self answer: nil |
|
23 |
! |
|
24 |
||
25 |
defaultLabel |
|
26 |
^ 'Change Selector' |
|
27 |
! |
|
28 |
||
29 |
innerButtonRow |
|
30 |
^ self buttonRow: |
|
31 |
#(('Select All' selectAll 'select all changes') |
|
32 |
('Select None' selectNone 'select no changes')) |
|
33 |
! |
|
34 |
||
35 |
kept |
|
36 |
^ kept ifNil: [kept _ Set new] |
|
37 |
! |
|
38 |
||
39 |
listSelectionAt: aNumber |
|
40 |
^ self kept includes: (self items at: aNumber) |
|
41 |
! |
|
42 |
||
43 |
listSelectionAt: aNumber put: aBoolean |
|
44 |
| item | |
|
45 |
item _ self items at: aNumber. |
|
46 |
aBoolean |
|
47 |
ifTrue: [self kept add: item ] |
|
48 |
ifFalse: [self kept remove: item ifAbsent: []] |
|
49 |
! |
|
50 |
||
51 |
select |
|
52 |
self answer: (MCPatch operations: kept) |
|
53 |
! |
|
54 |
||
55 |
selectAll |
|
56 |
kept addAll: self items. |
|
57 |
self changed: #list |
|
58 |
! |
|
59 |
||
60 |
selectNone |
|
61 |
kept _ Set new. |
|
62 |
self changed: #list |
|
63 |
! |
|
64 |
||
65 |
widgetSpecs |
|
66 |
Preferences annotationPanes ifFalse: [ ^#( |
|
67 |
((buttonRow) (0 0 1 0) (0 0 0 30)) |
|
68 |
((multiListMorph:selection:listSelection:menu: list selection listSelectionAt: methodListMenu:) (0 0 1 0.4) (0 30 0 0)) |
|
69 |
((innerButtonRow) (0 0.4 1 0.4) (0 0 0 30)) |
|
70 |
((textMorph: text) (0 0.4 1 1) (0 30 0 0)) |
|
71 |
)]. |
|
72 |
||
73 |
^ #( |
|
74 |
((buttonRow) (0 0 1 0) (0 0 0 30)) |
|
75 |
((multiListMorph:selection:listSelection:menu: list selection listSelectionAt: methodListMenu:) (0 0 1 0.4) (0 30 0 0)) |
|
76 |
((innerButtonRow) (0 0.4 1 0.4) (0 0 0 30)) |
|
77 |
((textMorph: annotations) (0 0.4 1 0.4) (0 30 0 60)) |
|
78 |
((textMorph: text) (0 0.4 1 1) (0 60 0 0)) |
|
79 |
) |
|
80 |
! ! |
|
81 |
||
82 |
!MCChangeSelector class methodsFor:'documentation'! |
|
83 |
||
84 |
version |
|
579 | 85 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCChangeSelector.st,v 1.2 2012-09-11 21:01:15 cg Exp $' |
120 | 86 |
! ! |
995
92bb466548a9
Removed test classes from stx:goodies/monticello - they're in tests sub package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
579
diff
changeset
|
87 |