author | fm |
Thu, 08 Oct 2009 14:00:52 +0200 | |
changeset 320 | 02b3b8b64cd2 |
parent 130 | dba6cd731a43 |
child 436 | 7811dd25c1b2 |
permissions | -rw-r--r-- |
47 | 1 |
"{ Package: 'cvut:stx/goodies/libsvn' }" |
2 |
||
3 |
"{ NameSpace: SVN }" |
|
4 |
||
5 |
Dialog subclass:#BranchSelectionDialog |
|
6 |
instanceVariableNames:'' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
9 |
category:'SVN-UI-Dialogs' |
|
10 |
! |
|
11 |
||
12 |
!BranchSelectionDialog class methodsFor:'documentation'! |
|
13 |
||
14 |
documentation |
|
15 |
" |
|
16 |
documentation to be added. |
|
17 |
||
18 |
[author:] |
|
19 |
Jan Vrany (janfrog@bruxa) |
|
20 |
||
21 |
[instance variables:] |
|
22 |
||
23 |
[class variables:] |
|
24 |
||
25 |
[see also:] |
|
26 |
||
27 |
" |
|
28 |
! |
|
29 |
||
30 |
examples |
|
31 |
" |
|
32 |
Starting the application: |
|
33 |
[exBegin] |
|
34 |
SVN::BranchSelectionDialog open |
|
35 |
||
36 |
[exEnd] |
|
37 |
||
38 |
more examples to be added: |
|
39 |
[exBegin] |
|
40 |
... add code fragment for |
|
41 |
... executable example here ... |
|
42 |
[exEnd] |
|
43 |
" |
|
44 |
! |
|
45 |
||
46 |
history |
|
47 |
"Created: / 11-04-2008 / 13:46:09 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
48 |
! ! |
|
49 |
||
50 |
!BranchSelectionDialog class methodsFor:'interface specs'! |
|
51 |
||
52 |
contentSpec |
|
53 |
"This resource specification was automatically generated |
|
54 |
by the UIPainter of ST/X." |
|
55 |
||
56 |
"Do not manually edit this!! If it is corrupted, |
|
57 |
the UIPainter may not be able to read the specification." |
|
58 |
||
59 |
" |
|
60 |
UIPainter new openOnClass:SVN::BranchSelectionDialog andSelector:#dialogSpec |
|
61 |
SVN::BranchSelectionDialog new openInterface:#dialogSpec |
|
62 |
" |
|
63 |
||
64 |
<resource: #canvas> |
|
65 |
||
66 |
^ |
|
67 |
#(FullSpec |
|
68 |
name: dialogSpec |
|
69 |
window: |
|
70 |
(WindowSpec |
|
71 |
label: 'NewApplication' |
|
72 |
name: 'NewApplication' |
|
73 |
min: (Point 10 10) |
|
74 |
bounds: (Rectangle 0 0 300 300) |
|
75 |
) |
|
76 |
component: |
|
77 |
(SpecCollection |
|
78 |
collection: ( |
|
79 |
(SelectionInListModelViewSpec |
|
80 |
name: 'BranchList' |
|
81 |
layout: (LayoutFrame 0 0 0 0 0 1 -25 1) |
|
82 |
model: branchAspect |
|
83 |
hasHorizontalScrollBar: true |
|
84 |
hasVerticalScrollBar: true |
|
85 |
listModel: branchesAspect |
|
86 |
useIndex: false |
|
87 |
highlightMode: line |
|
88 |
) |
|
89 |
(CheckBoxSpec |
|
90 |
label: 'Show tags' |
|
91 |
name: 'ShowTags' |
|
92 |
layout: (LayoutFrame 0 0 -25 1 0 1 0 1) |
|
93 |
initiallyDisabled: true |
|
94 |
model: showTagsAspect |
|
95 |
translateLabel: true |
|
96 |
) |
|
97 |
) |
|
98 |
||
99 |
) |
|
100 |
) |
|
101 |
||
102 |
"Created: / 21-10-2008 / 12:37:01 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
103 |
! ! |
|
104 |
||
105 |
!BranchSelectionDialog methodsFor:'accessing'! |
|
106 |
||
107 |
answerValueSelector |
|
108 |
"Superclass SVN::Dialog says that I am responsible to implement this method" |
|
109 |
||
110 |
^#branchAspect |
|
111 |
||
112 |
"Created: / 19-04-2008 / 13:15:20 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
113 |
! |
|
114 |
||
115 |
defaultTitle |
|
116 |
"Superclass SVN::Dialog says that I am responsible to implement this method" |
|
117 |
||
118 |
^ 'Select branch for ' , self model package asText allItalic |
|
119 |
||
120 |
"Created: / 03-10-2008 / 13:58:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
121 |
! ! |
|
122 |
||
123 |
!BranchSelectionDialog methodsFor:'aspects'! |
|
124 |
||
125 |
branchAspect |
|
126 |
"automatically generated by UIPainter ..." |
|
127 |
||
128 |
"*** the code below creates a default model when invoked." |
|
129 |
"*** (which may not be the one you wanted)" |
|
130 |
"*** Please change as required and accept it in the browser." |
|
131 |
"*** (and replace this comment by something more useful ;-)" |
|
132 |
||
133 |
|holder| |
|
134 |
||
135 |
(holder := builder bindingAt:#branchAspect) isNil ifTrue:[ |
|
136 |
holder := nil asValue. |
|
137 |
builder aspectAt:#branchAspect put:holder. |
|
138 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
139 |
"/ holder addDependent:self. |
|
140 |
"/ holder onChangeSend:#branchAspectChanged to:self. |
|
141 |
]. |
|
142 |
^ holder. |
|
143 |
||
144 |
"Created: / 14-04-2008 / 10:55:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
145 |
! |
|
146 |
||
147 |
branchesAspect |
|
148 |
"automatically generated by UIPainter ..." |
|
149 |
||
150 |
"*** the code below creates a default model when invoked." |
|
151 |
"*** (which may not be the one you wanted)" |
|
152 |
"*** Please change as required and accept it in the browser." |
|
153 |
"*** (and replace this comment by something more useful ;-)" |
|
154 |
||
155 |
|holder| |
|
156 |
||
157 |
(holder := builder bindingAt:#branchesAspect) isNil ifTrue:[ |
|
158 |
holder := (PluggableAdaptor on: self model) |
|
159 |
getBlock:[:model| |
|
160 |
self showTagsAspect value |
|
161 |
ifTrue:[model value branchesAndTags] |
|
162 |
ifFalse:[model value branches]] |
|
163 |
putBlock:[:model :value|] |
|
164 |
updateBlock:[:model :aspect :value|true] |
|
165 |
]. |
|
166 |
||
167 |
^ holder. |
|
168 |
||
169 |
"Created: / 14-04-2008 / 10:55:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
170 |
! |
|
171 |
||
172 |
canDoAcceptAspect |
|
173 |
||
174 |
|holder| |
|
175 |
||
176 |
(holder := builder bindingAt:#canDoAcceptAspect) isNil ifTrue:[ |
|
177 |
holder := (AspectAdaptor forAspect: #notNil) |
|
178 |
subjectChannel: self branchAspect. |
|
179 |
builder aspectAt:#canDoAcceptAspect put: holder |
|
180 |
]. |
|
181 |
^ holder. |
|
182 |
||
183 |
"Created: / 14-04-2008 / 11:19:21 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
184 |
! |
|
185 |
||
186 |
showTagsAspect |
|
187 |
"automatically generated by UIPainter ..." |
|
188 |
||
189 |
"*** the code below creates a default model when invoked." |
|
190 |
"*** (which may not be the one you wanted)" |
|
191 |
"*** Please change as required and accept it in the browser." |
|
192 |
"*** (and replace this comment by something more useful ;-)" |
|
193 |
||
194 |
|holder| |
|
195 |
||
196 |
(holder := builder bindingAt:#showTagsAspect) isNil ifTrue:[ |
|
197 |
holder := false asValue. |
|
198 |
builder aspectAt:#showTagsAspect put:holder. |
|
199 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
200 |
"/ holder addDependent:self. |
|
201 |
holder onChangeEvaluate:[self branchesAspect changed]. |
|
202 |
]. |
|
203 |
^ holder. |
|
204 |
||
205 |
"Created: / 14-04-2008 / 10:55:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
206 |
! ! |
|
207 |
||
208 |
!BranchSelectionDialog methodsFor:'drag & drop'! |
|
209 |
||
210 |
dropObjects:aCollectionOfDropObjects in:aComponent |
|
211 |
"drop manager wants to drop. |
|
212 |
This is ony sent, if #canDrop: returned true. |
|
213 |
Must be redefine in order for drop to work." |
|
214 |
||
215 |
self shouldImplement |
|
216 |
||
217 |
"Created: / 19-04-2008 / 13:15:20 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
218 |
! ! |
|
219 |
||
220 |
!BranchSelectionDialog class methodsFor:'documentation'! |
|
221 |
||
222 |
version |
|
223 |
^ '$Header$' |
|
130 | 224 |
! |
225 |
||
226 |
version_CVS |
|
227 |
^ '$Header$' |
|
228 |
! |
|
229 |
||
230 |
version_SVN |
|
320
02b3b8b64cd2
update #version_SVN with § as keyword expansion character
fm
parents:
130
diff
changeset
|
231 |
^'§Id: SVN__BranchSelectionDialog.st 70 2009-04-16 12:47:44Z vranyj1 §' |
47 | 232 |
! ! |