author | Claus Gittinger <cg@exept.de> |
Tue, 16 Jan 2018 22:26:58 +0100 | |
changeset 1183 | 8af078552bae |
parent 815 | b07d099c76dd |
permissions | -rw-r--r-- |
632 | 1 |
" |
2 |
Copyright (c) 2007-2010 Jan Vrany |
|
3 |
Copyright (c) 2009-2010 eXept Software AG |
|
4 |
||
5 |
Permission is hereby granted, free of charge, to any person |
|
6 |
obtaining a copy of this software and associated documentation |
|
7 |
files (the 'Software'), to deal in the Software without |
|
8 |
restriction, including without limitation the rights to use, |
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
10 |
copies of the Software, and to permit persons to whom the |
|
11 |
Software is furnished to do so, subject to the following |
|
12 |
conditions: |
|
13 |
||
14 |
The above copyright notice and this permission notice shall be |
|
15 |
included in all copies or substantial portions of the Software. |
|
16 |
||
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
24 |
OTHER DEALINGS IN THE SOFTWARE. |
|
25 |
" |
|
436 | 26 |
"{ Package: 'stx:libsvn' }" |
47 | 27 |
|
28 |
"{ NameSpace: SVN }" |
|
29 |
||
30 |
Dialog subclass:#BranchSelectionDialog |
|
31 |
instanceVariableNames:'' |
|
32 |
classVariableNames:'' |
|
33 |
poolDictionaries:'' |
|
34 |
category:'SVN-UI-Dialogs' |
|
35 |
! |
|
36 |
||
37 |
!BranchSelectionDialog class methodsFor:'documentation'! |
|
38 |
||
632 | 39 |
copyright |
40 |
" |
|
41 |
Copyright (c) 2007-2010 Jan Vrany |
|
42 |
Copyright (c) 2009-2010 eXept Software AG |
|
43 |
||
44 |
Permission is hereby granted, free of charge, to any person |
|
45 |
obtaining a copy of this software and associated documentation |
|
46 |
files (the 'Software'), to deal in the Software without |
|
47 |
restriction, including without limitation the rights to use, |
|
48 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
49 |
copies of the Software, and to permit persons to whom the |
|
50 |
Software is furnished to do so, subject to the following |
|
51 |
conditions: |
|
52 |
||
53 |
The above copyright notice and this permission notice shall be |
|
54 |
included in all copies or substantial portions of the Software. |
|
55 |
||
56 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
57 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
58 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
59 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
60 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
61 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
62 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
63 |
OTHER DEALINGS IN THE SOFTWARE. |
|
64 |
||
65 |
" |
|
66 |
! |
|
67 |
||
47 | 68 |
documentation |
69 |
" |
|
70 |
documentation to be added. |
|
71 |
||
72 |
[author:] |
|
73 |
Jan Vrany (janfrog@bruxa) |
|
74 |
||
75 |
[instance variables:] |
|
76 |
||
77 |
[class variables:] |
|
78 |
||
79 |
[see also:] |
|
80 |
||
81 |
" |
|
82 |
! |
|
83 |
||
84 |
examples |
|
85 |
" |
|
86 |
Starting the application: |
|
87 |
[exBegin] |
|
88 |
SVN::BranchSelectionDialog open |
|
89 |
||
90 |
[exEnd] |
|
91 |
||
92 |
more examples to be added: |
|
93 |
[exBegin] |
|
94 |
... add code fragment for |
|
95 |
... executable example here ... |
|
96 |
[exEnd] |
|
97 |
" |
|
98 |
! |
|
99 |
||
100 |
history |
|
101 |
"Created: / 11-04-2008 / 13:46:09 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
102 |
! ! |
|
103 |
||
104 |
!BranchSelectionDialog class methodsFor:'interface specs'! |
|
105 |
||
106 |
contentSpec |
|
107 |
"This resource specification was automatically generated |
|
108 |
by the UIPainter of ST/X." |
|
109 |
||
110 |
"Do not manually edit this!! If it is corrupted, |
|
111 |
the UIPainter may not be able to read the specification." |
|
112 |
||
113 |
" |
|
114 |
UIPainter new openOnClass:SVN::BranchSelectionDialog andSelector:#dialogSpec |
|
115 |
SVN::BranchSelectionDialog new openInterface:#dialogSpec |
|
116 |
" |
|
117 |
||
118 |
<resource: #canvas> |
|
119 |
||
120 |
^ |
|
121 |
#(FullSpec |
|
122 |
name: dialogSpec |
|
123 |
window: |
|
124 |
(WindowSpec |
|
125 |
label: 'NewApplication' |
|
126 |
name: 'NewApplication' |
|
127 |
min: (Point 10 10) |
|
128 |
bounds: (Rectangle 0 0 300 300) |
|
129 |
) |
|
130 |
component: |
|
131 |
(SpecCollection |
|
132 |
collection: ( |
|
133 |
(SelectionInListModelViewSpec |
|
134 |
name: 'BranchList' |
|
135 |
layout: (LayoutFrame 0 0 0 0 0 1 -25 1) |
|
136 |
model: branchAspect |
|
137 |
hasHorizontalScrollBar: true |
|
138 |
hasVerticalScrollBar: true |
|
139 |
listModel: branchesAspect |
|
140 |
useIndex: false |
|
141 |
highlightMode: line |
|
142 |
) |
|
143 |
(CheckBoxSpec |
|
144 |
label: 'Show tags' |
|
145 |
name: 'ShowTags' |
|
146 |
layout: (LayoutFrame 0 0 -25 1 0 1 0 1) |
|
147 |
initiallyDisabled: true |
|
148 |
model: showTagsAspect |
|
149 |
translateLabel: true |
|
150 |
) |
|
151 |
) |
|
152 |
||
153 |
) |
|
154 |
) |
|
155 |
||
156 |
"Created: / 21-10-2008 / 12:37:01 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
157 |
! ! |
|
158 |
||
698 | 159 |
!BranchSelectionDialog class methodsFor:'others'! |
160 |
||
161 |
version_CVS |
|
815
b07d099c76dd
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
698
diff
changeset
|
162 |
^ '$Header$' |
698 | 163 |
! ! |
164 |
||
47 | 165 |
!BranchSelectionDialog methodsFor:'accessing'! |
166 |
||
632 | 167 |
branch |
47 | 168 |
|
632 | 169 |
^self branchAspect value |
47 | 170 |
|
632 | 171 |
"Created: / 02-11-2009 / 16:51:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
47 | 172 |
! |
173 |
||
174 |
defaultTitle |
|
175 |
"Superclass SVN::Dialog says that I am responsible to implement this method" |
|
176 |
||
177 |
^ 'Select branch for ' , self model package asText allItalic |
|
178 |
||
179 |
"Created: / 03-10-2008 / 13:58:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
180 |
! ! |
|
181 |
||
182 |
!BranchSelectionDialog methodsFor:'aspects'! |
|
183 |
||
632 | 184 |
acceptEnabledHolder |
185 |
|holder| |
|
186 |
||
187 |
(holder := builder bindingAt:#acceptEnabledHolder) isNil ifTrue:[ |
|
188 |
holder := (AspectAdaptor forAspect:#notNil) |
|
189 |
subjectChannel:self branchAspect. |
|
190 |
builder aspectAt:#acceptEnabledHolder put:holder |
|
191 |
]. |
|
192 |
^ holder. |
|
193 |
||
194 |
"Created: / 14-04-2008 / 11:19:21 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
195 |
! |
|
196 |
||
47 | 197 |
branchAspect |
198 |
"automatically generated by UIPainter ..." |
|
199 |
||
200 |
"*** the code below creates a default model when invoked." |
|
201 |
"*** (which may not be the one you wanted)" |
|
202 |
"*** Please change as required and accept it in the browser." |
|
203 |
"*** (and replace this comment by something more useful ;-)" |
|
204 |
||
205 |
|holder| |
|
206 |
||
207 |
(holder := builder bindingAt:#branchAspect) isNil ifTrue:[ |
|
208 |
holder := nil asValue. |
|
209 |
builder aspectAt:#branchAspect put:holder. |
|
210 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
211 |
"/ holder addDependent:self. |
|
212 |
"/ holder onChangeSend:#branchAspectChanged to:self. |
|
213 |
]. |
|
214 |
^ holder. |
|
215 |
||
216 |
"Created: / 14-04-2008 / 10:55:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
217 |
! |
|
218 |
||
219 |
branchesAspect |
|
220 |
"automatically generated by UIPainter ..." |
|
221 |
||
222 |
"*** the code below creates a default model when invoked." |
|
223 |
"*** (which may not be the one you wanted)" |
|
224 |
"*** Please change as required and accept it in the browser." |
|
225 |
"*** (and replace this comment by something more useful ;-)" |
|
226 |
||
227 |
|holder| |
|
228 |
||
229 |
(holder := builder bindingAt:#branchesAspect) isNil ifTrue:[ |
|
230 |
holder := (PluggableAdaptor on: self model) |
|
231 |
getBlock:[:model| |
|
232 |
self showTagsAspect value |
|
233 |
ifTrue:[model value branchesAndTags] |
|
234 |
ifFalse:[model value branches]] |
|
235 |
putBlock:[:model :value|] |
|
236 |
updateBlock:[:model :aspect :value|true] |
|
237 |
]. |
|
238 |
||
239 |
^ holder. |
|
240 |
||
241 |
"Created: / 14-04-2008 / 10:55:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
242 |
! |
|
243 |
||
244 |
showTagsAspect |
|
245 |
"automatically generated by UIPainter ..." |
|
246 |
||
247 |
"*** the code below creates a default model when invoked." |
|
248 |
"*** (which may not be the one you wanted)" |
|
249 |
"*** Please change as required and accept it in the browser." |
|
250 |
"*** (and replace this comment by something more useful ;-)" |
|
251 |
||
252 |
|holder| |
|
253 |
||
254 |
(holder := builder bindingAt:#showTagsAspect) isNil ifTrue:[ |
|
255 |
holder := false asValue. |
|
256 |
builder aspectAt:#showTagsAspect put:holder. |
|
257 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
|
258 |
"/ holder addDependent:self. |
|
259 |
holder onChangeEvaluate:[self branchesAspect changed]. |
|
260 |
]. |
|
261 |
^ holder. |
|
262 |
||
263 |
"Created: / 14-04-2008 / 10:55:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
264 |
! ! |
|
265 |
||
266 |
!BranchSelectionDialog methodsFor:'drag & drop'! |
|
267 |
||
268 |
dropObjects:aCollectionOfDropObjects in:aComponent |
|
269 |
"drop manager wants to drop. |
|
270 |
This is ony sent, if #canDrop: returned true. |
|
271 |
Must be redefine in order for drop to work." |
|
272 |
||
273 |
self shouldImplement |
|
274 |
||
275 |
"Created: / 19-04-2008 / 13:15:20 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
276 |
! ! |
|
277 |
||
278 |
!BranchSelectionDialog class methodsFor:'documentation'! |
|
279 |
||
280 |
version |
|
815
b07d099c76dd
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
698
diff
changeset
|
281 |
^ '$Header$' |
130 | 282 |
! |
283 |
||
284 |
version_SVN |
|
815
b07d099c76dd
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
698
diff
changeset
|
285 |
^ '§Id: SVN__BranchSelectionDialog.st 362 2011-08-08 13:07:42Z vranyj1 §' |
47 | 286 |
! ! |