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