737
|
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 |
"
|
459
|
26 |
"{ Package: 'stx:libsvn' }"
|
35
|
27 |
|
|
28 |
"{ NameSpace: SVN }"
|
|
29 |
|
|
30 |
Dialog subclass:#Wizard
|
|
31 |
instanceVariableNames:'paneHolder goNextEnabledHolder goPrevEnabledHolder'
|
|
32 |
classVariableNames:''
|
|
33 |
poolDictionaries:''
|
|
34 |
category:'SVN-UI-Dialogs'
|
|
35 |
!
|
|
36 |
|
737
|
37 |
!Wizard class methodsFor:'documentation'!
|
|
38 |
|
|
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 |
! !
|
35
|
67 |
|
|
68 |
!Wizard class methodsFor:'interface specs'!
|
|
69 |
|
|
70 |
buttonsSpec
|
|
71 |
"This resource specification was automatically generated
|
|
72 |
by the UIPainter of ST/X."
|
|
73 |
|
|
74 |
"Do not manually edit this!! If it is corrupted,
|
|
75 |
the UIPainter may not be able to read the specification."
|
|
76 |
|
|
77 |
"
|
|
78 |
UIPainter new openOnClass:SVN::Wizard andSelector:#buttonsSpec
|
|
79 |
SVN::Wizard new openInterface:#buttonsSpec
|
|
80 |
"
|
|
81 |
|
|
82 |
<resource: #canvas>
|
|
83 |
|
|
84 |
^
|
|
85 |
#(FullSpec
|
|
86 |
name: buttonsSpec
|
|
87 |
window:
|
|
88 |
(WindowSpec
|
|
89 |
label: 'Buttons'
|
|
90 |
name: 'Buttons'
|
|
91 |
min: (Point 10 10)
|
|
92 |
bounds: (Rectangle 0 0 400 30)
|
|
93 |
)
|
|
94 |
component:
|
|
95 |
(SpecCollection
|
|
96 |
collection: (
|
|
97 |
(HorizontalPanelViewSpec
|
|
98 |
name: 'ButtonPanel'
|
|
99 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
100 |
horizontalLayout: rightSpace
|
|
101 |
verticalLayout: center
|
|
102 |
horizontalSpace: 3
|
|
103 |
verticalSpace: 3
|
|
104 |
component:
|
|
105 |
(SpecCollection
|
|
106 |
collection: (
|
|
107 |
(ActionButtonSpec
|
|
108 |
label: 'Prev'
|
|
109 |
name: 'PrevButton'
|
|
110 |
translateLabel: true
|
|
111 |
model: goPrev
|
|
112 |
enableChannel: goPrevEnabledHolder
|
|
113 |
extent: (Point 125 22)
|
|
114 |
)
|
|
115 |
(ActionButtonSpec
|
|
116 |
label: 'Next'
|
|
117 |
name: 'NextButton'
|
|
118 |
translateLabel: true
|
|
119 |
model: goNext
|
|
120 |
enableChannel: goNextEnabledHolder
|
|
121 |
extent: (Point 125 22)
|
|
122 |
)
|
|
123 |
(ActionButtonSpec
|
|
124 |
label: 'OK'
|
|
125 |
name: 'AcceptButton'
|
|
126 |
translateLabel: true
|
|
127 |
labelChannel: acceptButtonTitleAspect
|
|
128 |
model: doAccept
|
737
|
129 |
enableChannel: acceptEnabledHolder
|
35
|
130 |
extent: (Point 125 22)
|
|
131 |
)
|
|
132 |
(ActionButtonSpec
|
|
133 |
label: 'Cancel'
|
|
134 |
name: 'CancelButton'
|
|
135 |
translateLabel: true
|
|
136 |
model: doCancel
|
|
137 |
extent: (Point 125 22)
|
|
138 |
)
|
|
139 |
)
|
|
140 |
|
|
141 |
)
|
|
142 |
)
|
|
143 |
)
|
|
144 |
|
|
145 |
)
|
|
146 |
)
|
|
147 |
|
|
148 |
"Modified: / 24-03-2009 / 19:52:02 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
149 |
!
|
|
150 |
|
|
151 |
contentSpec
|
|
152 |
"This resource specification was automatically generated
|
|
153 |
by the UIPainter of ST/X."
|
|
154 |
|
|
155 |
"Do not manually edit this!! If it is corrupted,
|
|
156 |
the UIPainter may not be able to read the specification."
|
|
157 |
|
|
158 |
"
|
|
159 |
UIPainter new openOnClass:SVN::Wizard andSelector:#contentSpec
|
|
160 |
SVN::Wizard new openInterface:#contentSpec
|
|
161 |
"
|
|
162 |
|
|
163 |
<resource: #canvas>
|
|
164 |
|
|
165 |
^
|
|
166 |
#(FullSpec
|
|
167 |
name: contentSpec
|
|
168 |
window:
|
|
169 |
(WindowSpec
|
|
170 |
label: 'Content'
|
|
171 |
name: 'Content'
|
|
172 |
min: (Point 10 10)
|
|
173 |
bounds: (Rectangle 0 0 300 300)
|
|
174 |
)
|
|
175 |
component:
|
|
176 |
(SpecCollection
|
|
177 |
collection: (
|
|
178 |
(SubCanvasSpec
|
|
179 |
name: 'WizardPane'
|
|
180 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
181 |
hasHorizontalScrollBar: false
|
|
182 |
hasVerticalScrollBar: false
|
|
183 |
miniScrollerHorizontal: false
|
|
184 |
clientHolder: paneHolder
|
|
185 |
createNewBuilder: false
|
|
186 |
)
|
|
187 |
)
|
|
188 |
|
|
189 |
)
|
|
190 |
)
|
|
191 |
! !
|
|
192 |
|
737
|
193 |
!Wizard class methodsFor:'others'!
|
35
|
194 |
|
737
|
195 |
version_CVS
|
|
196 |
^ '$ÂHeader: /cvs/stx/stx/libsvn/SVN__Wizard.st,v 1.4 2009/10/19 12:24:08 fm Exp Â$'
|
|
197 |
! !
|
35
|
198 |
|
737
|
199 |
!Wizard methodsFor:'accessing'!
|
35
|
200 |
|
|
201 |
defaultSubtitle
|
|
202 |
^ 'Package: ' , self model package asText allItalic
|
|
203 |
|
|
204 |
"Created: / 28-10-2008 / 09:14:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
205 |
!
|
|
206 |
|
|
207 |
firstPane
|
|
208 |
"
|
|
209 |
Answers the very first pane to show
|
|
210 |
"
|
|
211 |
|
|
212 |
^self subclassResponsibility
|
|
213 |
|
|
214 |
"Created: / 20-03-2009 / 13:46:29 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
215 |
!
|
|
216 |
|
|
217 |
pane
|
|
218 |
|
|
219 |
^self paneHolder value
|
|
220 |
|
|
221 |
"Created: / 08-04-2009 / 20:17:48 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
222 |
!
|
|
223 |
|
|
224 |
pane:aWizardPane
|
|
225 |
self pane leave.
|
|
226 |
self paneHolder subjectChannel:aWizardPane.
|
|
227 |
self paneHolder changed.
|
|
228 |
aWizardPane masterApplication: self.
|
|
229 |
self updateButtons.
|
|
230 |
self pane enter.
|
|
231 |
|
|
232 |
"Created: / 21-03-2009 / 10:55:25 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
233 |
"Modified: / 09-04-2009 / 08:53:00 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
234 |
!
|
|
235 |
|
|
236 |
task
|
|
237 |
|
|
238 |
^self model
|
|
239 |
|
|
240 |
"Created: / 23-03-2009 / 11:49:15 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
241 |
!
|
|
242 |
|
|
243 |
task: aTask
|
|
244 |
|
|
245 |
^self model: aTask
|
|
246 |
|
|
247 |
"Created: / 23-03-2009 / 11:49:24 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
248 |
! !
|
|
249 |
|
|
250 |
!Wizard methodsFor:'accessing - buttons'!
|
|
251 |
|
|
252 |
goNextEnabled: aBoolean
|
|
253 |
|
|
254 |
self goNextEnabledHolder value: aBoolean
|
|
255 |
|
|
256 |
"Created: / 24-03-2009 / 19:56:02 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
257 |
!
|
|
258 |
|
|
259 |
goPrevEnabled: aBoolean
|
|
260 |
|
|
261 |
self goPrevEnabledHolder value: aBoolean
|
|
262 |
|
|
263 |
"Created: / 24-03-2009 / 19:56:10 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
264 |
! !
|
|
265 |
|
|
266 |
!Wizard methodsFor:'actions'!
|
|
267 |
|
|
268 |
goNext
|
|
269 |
|
|
270 |
self showContent.
|
|
271 |
^self pane value goNext
|
|
272 |
|
|
273 |
"Created: / 24-03-2009 / 14:38:08 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
274 |
"Modified: / 09-04-2009 / 08:30:41 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
275 |
!
|
|
276 |
|
|
277 |
goPrev
|
|
278 |
|
|
279 |
self showContent.
|
|
280 |
^self pane value goPrev
|
|
281 |
|
|
282 |
"Created: / 24-03-2009 / 14:38:13 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
283 |
"Modified: / 09-04-2009 / 08:31:03 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
284 |
! !
|
|
285 |
|
|
286 |
!Wizard methodsFor:'aspects'!
|
|
287 |
|
|
288 |
goNextEnabledHolder
|
|
289 |
|
|
290 |
goNextEnabledHolder ifNil:
|
|
291 |
[goNextEnabledHolder := false asValue].
|
|
292 |
^goNextEnabledHolder
|
|
293 |
|
|
294 |
"Created: / 24-03-2009 / 19:51:21 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
295 |
!
|
|
296 |
|
|
297 |
goPrevEnabledHolder
|
|
298 |
|
|
299 |
goPrevEnabledHolder ifNil:
|
|
300 |
[goPrevEnabledHolder := false asValue].
|
|
301 |
^goPrevEnabledHolder
|
|
302 |
|
|
303 |
"Created: / 24-03-2009 / 19:51:37 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
304 |
!
|
|
305 |
|
|
306 |
paneHolder
|
|
307 |
paneHolder
|
|
308 |
ifNil:[
|
|
309 |
paneHolder := (AspectAdaptor subjectChannel:self firstPane
|
|
310 |
sendsUpdates:true) forAspect:#value.
|
|
311 |
].
|
|
312 |
^ paneHolder
|
|
313 |
|
|
314 |
"Created: / 20-03-2009 / 13:45:54 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
315 |
"Modified: / 24-03-2009 / 20:09:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
316 |
! !
|
|
317 |
|
|
318 |
!Wizard methodsFor:'change & update'!
|
|
319 |
|
|
320 |
contentSpecChanged: specSymbol
|
|
321 |
|
|
322 |
self updateButtons
|
|
323 |
|
|
324 |
"Created: / 24-03-2009 / 20:15:48 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
325 |
!
|
|
326 |
|
|
327 |
updateButtons
|
|
328 |
|
|
329 |
self pane value updateButtons
|
|
330 |
|
|
331 |
"Created: / 24-03-2009 / 19:54:17 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
332 |
! !
|
|
333 |
|
|
334 |
!Wizard methodsFor:'hooks'!
|
|
335 |
|
|
336 |
postOpenWith: anUIBuilder
|
|
337 |
|
|
338 |
^self pane value enter
|
|
339 |
|
|
340 |
"Created: / 02-04-2009 / 17:10:14 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
341 |
! !
|
|
342 |
|
|
343 |
!Wizard methodsFor:'initialization'!
|
|
344 |
|
|
345 |
initialize
|
|
346 |
"Invoked when a new instance is created."
|
|
347 |
|
|
348 |
"/ please change as required (and remove this comment)
|
|
349 |
"/ pane := nil.
|
|
350 |
|
|
351 |
super initialize.
|
|
352 |
! !
|
|
353 |
|
|
354 |
!Wizard class methodsFor:'documentation'!
|
|
355 |
|
|
356 |
version
|
737
|
357 |
^ '$Id$'
|
208
|
358 |
!
|
|
359 |
|
|
360 |
version_SVN
|
737
|
361 |
^ '§Id: SVN__Wizard.st 350 2011-07-07 18:42:56Z vranyj1 §'
|
35
|
362 |
! !
|