author | Claus Gittinger <cg@exept.de> |
Tue, 16 Jan 2018 22:26:58 +0100 | |
changeset 1183 | 8af078552bae |
parent 1109 | cee721f7119a |
permissions | -rw-r--r-- |
747 | 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 |
" |
|
422 | 26 |
"{ Package: 'stx:libsvn' }" |
61 | 27 |
|
28 |
"{ NameSpace: SVN }" |
|
29 |
||
30 |
SimpleDialog subclass:#Dialog |
|
747 | 31 |
instanceVariableNames:'onCancelBlock onAcceptBlock modelHolder titleHolder |
1109
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
32 |
subtitleHolder infoHolder progressIndicator worker exception |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
33 |
infoPanel' |
747 | 34 |
classVariableNames:'CatchExceptions' |
61 | 35 |
poolDictionaries:'' |
36 |
category:'SVN-UI-Dialogs' |
|
37 |
! |
|
38 |
||
747 | 39 |
!Dialog class methodsFor:'documentation'! |
40 |
||
41 |
copyright |
|
42 |
" |
|
43 |
Copyright (c) 2007-2010 Jan Vrany |
|
44 |
Copyright (c) 2009-2010 eXept Software AG |
|
45 |
||
46 |
Permission is hereby granted, free of charge, to any person |
|
47 |
obtaining a copy of this software and associated documentation |
|
48 |
files (the 'Software'), to deal in the Software without |
|
49 |
restriction, including without limitation the rights to use, |
|
50 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
51 |
copies of the Software, and to permit persons to whom the |
|
52 |
Software is furnished to do so, subject to the following |
|
53 |
conditions: |
|
54 |
||
55 |
The above copyright notice and this permission notice shall be |
|
56 |
included in all copies or substantial portions of the Software. |
|
57 |
||
58 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
59 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
60 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
61 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
62 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
63 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
64 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
65 |
OTHER DEALINGS IN THE SOFTWARE. |
|
66 |
||
67 |
" |
|
68 |
! ! |
|
61 | 69 |
|
70 |
!Dialog class methodsFor:'instance creation'! |
|
71 |
||
72 |
on: model |
|
73 |
||
74 |
^self new |
|
75 |
model: model; |
|
76 |
yourself |
|
77 |
||
78 |
"Created: / 14-04-2008 / 11:09:38 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
79 |
! ! |
|
80 |
||
747 | 81 |
!Dialog class methodsFor:'accessing'! |
82 |
||
83 |
catchExceptions |
|
84 |
||
85 |
^CatchExceptions isNil or:[CatchExceptions] |
|
86 |
||
87 |
"Created: / 09-12-2009 / 16:22:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
88 |
! |
|
89 |
||
90 |
catchExceptions: aBoolean |
|
91 |
||
92 |
CatchExceptions := aBoolean |
|
93 |
||
94 |
"Created: / 09-12-2009 / 16:22:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
95 |
! ! |
|
96 |
||
61 | 97 |
!Dialog class methodsFor:'image specs'! |
98 |
||
99 |
dialogIcon |
|
100 |
^ IconLibrary svn_wizban |
|
101 |
||
102 |
"Created: / 13-04-2008 / 11:06:56 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
747 | 103 |
! |
104 |
||
105 |
downArrow |
|
106 |
"This resource specification was automatically generated |
|
107 |
by the ImageEditor of ST/X." |
|
108 |
||
109 |
"Do not manually edit this!! If it is corrupted, |
|
110 |
the ImageEditor may not be able to read the specification." |
|
111 |
||
112 |
" |
|
113 |
self downArrow inspect |
|
114 |
ImageEditor openOnClass:self andSelector:#downArrow |
|
115 |
Icon flushCachedIcons |
|
116 |
" |
|
117 |
||
118 |
<resource: #image> |
|
119 |
||
120 |
^Icon |
|
121 |
constantNamed:'SVN::Dialog class downArrow' |
|
122 |
ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@C?@O<@_ @<@A @@@@@@@@@@@@@@b') ; yourself); yourself] |
|
123 |
! |
|
124 |
||
125 |
errorIcon |
|
126 |
^ ToolbarIconLibrary error32x32Icon |
|
127 |
||
128 |
"Created: / 09-12-2009 / 16:38:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
61 | 129 |
! ! |
130 |
||
131 |
!Dialog class methodsFor:'interface opening'! |
|
132 |
||
133 |
openOn: model |
|
134 |
||
135 |
||
136 |
^(self on: model) open |
|
137 |
||
138 |
"Created: / 14-04-2008 / 11:09:38 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
139 |
"Modified: / 19-04-2008 / 13:17:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
140 |
! ! |
|
141 |
||
142 |
!Dialog class methodsFor:'interface specs'! |
|
143 |
||
144 |
buttonsSpec |
|
145 |
"This resource specification was automatically generated |
|
146 |
by the UIPainter of ST/X." |
|
147 |
||
148 |
"Do not manually edit this!! If it is corrupted, |
|
149 |
the UIPainter may not be able to read the specification." |
|
150 |
||
151 |
" |
|
152 |
UIPainter new openOnClass:SVN::Dialog andSelector:#buttonsSpec |
|
153 |
SVN::Dialog new openInterface:#buttonsSpec |
|
154 |
" |
|
155 |
||
156 |
<resource: #canvas> |
|
157 |
||
158 |
^ |
|
159 |
#(FullSpec |
|
160 |
name: buttonsSpec |
|
161 |
window: |
|
162 |
(WindowSpec |
|
163 |
label: 'Buttons' |
|
164 |
name: 'Buttons' |
|
165 |
min: (Point 10 10) |
|
166 |
bounds: (Rectangle 0 0 400 30) |
|
167 |
) |
|
168 |
component: |
|
169 |
(SpecCollection |
|
170 |
collection: ( |
|
171 |
(HorizontalPanelViewSpec |
|
172 |
name: 'ButtonPanel' |
|
173 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
174 |
horizontalLayout: rightSpace |
|
175 |
verticalLayout: center |
|
176 |
horizontalSpace: 3 |
|
177 |
verticalSpace: 3 |
|
178 |
component: |
|
179 |
(SpecCollection |
|
180 |
collection: ( |
|
181 |
(ActionButtonSpec |
|
182 |
label: 'OK' |
|
183 |
name: 'AcceptButton' |
|
184 |
translateLabel: true |
|
185 |
labelChannel: acceptButtonTitleAspect |
|
186 |
model: doAccept |
|
747 | 187 |
enableChannel: acceptEnabledHolder |
61 | 188 |
extent: (Point 125 22) |
189 |
) |
|
190 |
(ActionButtonSpec |
|
191 |
label: 'Cancel' |
|
192 |
name: 'CancelButton' |
|
193 |
translateLabel: true |
|
194 |
model: doCancel |
|
195 |
extent: (Point 125 22) |
|
196 |
) |
|
197 |
) |
|
198 |
||
199 |
) |
|
200 |
) |
|
201 |
) |
|
202 |
||
203 |
) |
|
204 |
) |
|
205 |
! |
|
206 |
||
207 |
contentSpec |
|
208 |
"This resource specification was automatically generated |
|
209 |
by the UIPainter of ST/X." |
|
210 |
||
211 |
"Do not manually edit this!! If it is corrupted, |
|
212 |
the UIPainter may not be able to read the specification." |
|
213 |
||
214 |
" |
|
215 |
UIPainter new openOnClass:SVN::Dialog andSelector:#contentSpec |
|
216 |
SVN::Dialog new openInterface:#contentSpec |
|
217 |
" |
|
218 |
||
219 |
<resource: #canvas> |
|
220 |
||
221 |
^ |
|
222 |
#(FullSpec |
|
223 |
name: contentSpec |
|
224 |
window: |
|
225 |
(WindowSpec |
|
226 |
label: 'Dialog' |
|
227 |
name: 'Dialog' |
|
228 |
min: (Point 10 10) |
|
229 |
bounds: (Rectangle 0 0 300 300) |
|
230 |
) |
|
231 |
component: |
|
232 |
(SpecCollection |
|
233 |
collection: ( |
|
234 |
(LabelSpec |
|
235 |
label: 'You should override #contentSpec' |
|
236 |
name: 'Message' |
|
237 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
238 |
translateLabel: true |
|
239 |
) |
|
240 |
) |
|
241 |
||
242 |
) |
|
243 |
) |
|
244 |
! |
|
245 |
||
747 | 246 |
errorSpec |
247 |
"This resource specification was automatically generated |
|
248 |
by the UIPainter of ST/X." |
|
249 |
||
250 |
"Do not manually edit this!! If it is corrupted, |
|
251 |
the UIPainter may not be able to read the specification." |
|
252 |
||
253 |
" |
|
254 |
UIPainter new openOnClass:SVN::Dialog andSelector:#errorSpec |
|
255 |
SVN::Dialog new openInterface:#errorSpec |
|
256 |
" |
|
257 |
||
258 |
<resource: #canvas> |
|
259 |
||
260 |
^ |
|
261 |
#(FullSpec |
|
262 |
name: errorSpec |
|
263 |
window: |
|
264 |
(WindowSpec |
|
265 |
label: 'Error' |
|
266 |
name: 'Error' |
|
267 |
min: (Point 10 10) |
|
268 |
bounds: (Rectangle 0 0 300 300) |
|
269 |
) |
|
270 |
component: |
|
271 |
(SpecCollection |
|
272 |
collection: ( |
|
273 |
(LabelSpec |
|
274 |
label: 'errorIcon' |
|
275 |
name: 'ErrorIcon' |
|
276 |
layout: (LayoutFrame 0 0 0 0 35 0 35 0) |
|
277 |
hasCharacterOrientedLabel: false |
|
278 |
translateLabel: true |
|
279 |
) |
|
280 |
(LabelSpec |
|
281 |
name: 'ErrorMessage' |
|
282 |
layout: (LayoutFrame 35 0 0 0 0 1 0 1) |
|
283 |
translateLabel: true |
|
284 |
labelChannel: infoHolder |
|
285 |
) |
|
286 |
) |
|
287 |
||
288 |
) |
|
289 |
) |
|
290 |
! |
|
291 |
||
61 | 292 |
messageSpec |
293 |
"This resource specification was automatically generated |
|
294 |
by the UIPainter of ST/X." |
|
295 |
||
296 |
"Do not manually edit this!! If it is corrupted, |
|
297 |
the UIPainter may not be able to read the specification." |
|
298 |
||
299 |
" |
|
300 |
UIPainter new openOnClass:SVN::Dialog andSelector:#messageSpec |
|
301 |
SVN::Dialog new openInterface:#messageSpec |
|
302 |
" |
|
303 |
||
304 |
<resource: #canvas> |
|
305 |
||
306 |
^ |
|
307 |
#(FullSpec |
|
308 |
name: messageSpec |
|
309 |
window: |
|
310 |
(WindowSpec |
|
311 |
label: 'Message' |
|
312 |
name: 'Message' |
|
313 |
min: (Point 10 10) |
|
314 |
bounds: (Rectangle 0 0 300 300) |
|
315 |
) |
|
316 |
component: |
|
317 |
(SpecCollection |
|
318 |
collection: ( |
|
319 |
(HTMLViewSpec |
|
320 |
name: 'HTMLBrowser' |
|
321 |
layout: (LayoutFrame 20 0 20 0 -20 1 -20 1) |
|
322 |
level: 0 |
|
323 |
hasHorizontalScrollBar: true |
|
324 |
hasVerticalScrollBar: true |
|
325 |
htmlText: infoHolder |
|
326 |
) |
|
327 |
) |
|
328 |
||
329 |
) |
|
330 |
) |
|
331 |
! |
|
332 |
||
333 |
progressSpec |
|
334 |
"This resource specification was automatically generated |
|
335 |
by the UIPainter of ST/X." |
|
336 |
||
337 |
"Do not manually edit this!! If it is corrupted, |
|
338 |
the UIPainter may not be able to read the specification." |
|
339 |
||
340 |
" |
|
341 |
UIPainter new openOnClass:SVN::Dialog andSelector:#progressSpec |
|
342 |
SVN::Dialog new openInterface:#progressSpec |
|
343 |
" |
|
344 |
||
345 |
<resource: #canvas> |
|
346 |
||
347 |
^ |
|
348 |
#(FullSpec |
|
349 |
name: progressSpec |
|
350 |
window: |
|
351 |
(WindowSpec |
|
352 |
label: 'Progress' |
|
353 |
name: 'Progress' |
|
354 |
min: (Point 10 10) |
|
355 |
bounds: (Rectangle 0 0 300 300) |
|
356 |
) |
|
357 |
component: |
|
358 |
(SpecCollection |
|
359 |
collection: ( |
|
360 |
(VerticalPanelViewSpec |
|
361 |
name: 'InfoPanel' |
|
362 |
layout: (LayoutFrame 20 0 20 0 -20 1 -20 1) |
|
363 |
horizontalLayout: fit |
|
364 |
verticalLayout: center |
|
365 |
horizontalSpace: 3 |
|
366 |
verticalSpace: 3 |
|
367 |
component: |
|
368 |
(SpecCollection |
|
369 |
collection: ( |
|
370 |
(LabelSpec |
|
371 |
label: 'Working' |
|
372 |
name: 'InfoHolder' |
|
373 |
translateLabel: true |
|
374 |
labelChannel: infoHolder |
|
375 |
adjust: left |
|
376 |
useDefaultExtent: true |
|
377 |
) |
|
378 |
(ProgressIndicatorSpec |
|
379 |
name: 'ProgressIndicator' |
|
380 |
model: progressHolder |
|
381 |
isActivityIndicator: true |
|
382 |
postBuildCallback: postBuildProgressIndicator: |
|
383 |
useDefaultExtent: true |
|
384 |
) |
|
385 |
) |
|
386 |
||
387 |
) |
|
388 |
) |
|
389 |
) |
|
390 |
||
391 |
) |
|
392 |
) |
|
393 |
! |
|
394 |
||
395 |
windowSpec |
|
396 |
"This resource specification was automatically generated |
|
397 |
by the UIPainter of ST/X." |
|
398 |
||
399 |
"Do not manually edit this!! If it is corrupted, |
|
400 |
the UIPainter may not be able to read the specification." |
|
401 |
||
402 |
" |
|
403 |
UIPainter new openOnClass:SVN::Dialog andSelector:#windowSpec |
|
404 |
SVN::Dialog new openInterface:#windowSpec |
|
405 |
SVN::Dialog open |
|
406 |
" |
|
407 |
||
408 |
<resource: #canvas> |
|
409 |
||
410 |
^ |
|
411 |
#(FullSpec |
|
412 |
name: windowSpec |
|
413 |
window: |
|
414 |
(WindowSpec |
|
1109
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
415 |
label: 'SubVersion: Dialog ' |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
416 |
name: 'SubVersion: Dialog ' |
61 | 417 |
labelChannel: titleHolder |
418 |
min: (Point 10 10) |
|
419 |
bounds: (Rectangle 0 0 648 451) |
|
420 |
) |
|
421 |
component: |
|
422 |
(SpecCollection |
|
423 |
collection: ( |
|
424 |
(ViewSpec |
|
425 |
name: 'TitleBox' |
|
426 |
layout: (LayoutFrame 0 0 0 0 0 1 66 0) |
|
427 |
backgroundColor: (Color 100.0 100.0 100.0) |
|
428 |
component: |
|
429 |
(SpecCollection |
|
430 |
collection: ( |
|
431 |
(LabelSpec |
|
432 |
label: 'SVN Dialog' |
|
433 |
name: 'DialogTitle' |
|
434 |
layout: (LayoutFrame 10 0 0 0 -75 1 40 0) |
|
435 |
style: (FontDescription helvetica medium roman 18 #'iso10646-1') |
|
436 |
backgroundColor: (Color 100.0 100.0 100.0) |
|
437 |
translateLabel: true |
|
438 |
labelChannel: titleHolder |
|
439 |
adjust: left |
|
440 |
) |
|
441 |
(LabelSpec |
|
442 |
label: 'SVN Dialog Subtitle' |
|
443 |
name: 'DialogSubtitle' |
|
444 |
layout: (LayoutFrame 30 0 40 0 -75 1 66 0) |
|
445 |
backgroundColor: (Color 100.0 100.0 100.0) |
|
446 |
translateLabel: true |
|
447 |
labelChannel: subtitleHolder |
|
448 |
resizeForLabel: false |
|
449 |
adjust: left |
|
450 |
) |
|
451 |
(LabelSpec |
|
452 |
label: 'Icon' |
|
453 |
name: 'DialogIcon' |
|
454 |
layout: (LayoutFrame -75 1 0 0 0 1 66 0) |
|
455 |
hasCharacterOrientedLabel: false |
|
456 |
backgroundColor: (Color 100.0 100.0 100.0) |
|
457 |
translateLabel: true |
|
458 |
labelChannel: dialogIconAspect |
|
459 |
) |
|
460 |
) |
|
461 |
||
462 |
) |
|
463 |
) |
|
1109
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
464 |
(ViewSpec |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
465 |
name: 'ContentBox' |
61 | 466 |
layout: (LayoutFrame 5 0 70 0 -5 1 -50 1) |
1109
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
467 |
component: |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
468 |
(SpecCollection |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
469 |
collection: ( |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
470 |
(SubCanvasSpec |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
471 |
name: 'InfoPanel' |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
472 |
layout: (LayoutFrame 0 0 0 0 0 1 40 0) |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
473 |
level: 0 |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
474 |
initiallyInvisible: true |
61 | 475 |
hasHorizontalScrollBar: false |
476 |
hasVerticalScrollBar: false |
|
1109
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
477 |
clientKey: infoPanel |
61 | 478 |
createNewBuilder: false |
479 |
) |
|
1109
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
480 |
(SubCanvasSpec |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
481 |
name: 'Content' |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
482 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
483 |
hasHorizontalScrollBar: false |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
484 |
hasVerticalScrollBar: false |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
485 |
specHolder: contentSpecHolder |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
486 |
createNewBuilder: false |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
487 |
) |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
488 |
) |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
489 |
|
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
490 |
) |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
491 |
) |
61 | 492 |
(DividerSpec |
493 |
name: 'Separator' |
|
494 |
layout: (LayoutFrame 5 0 -50 1 -5 1 -30 1) |
|
495 |
) |
|
496 |
(UISubSpecification |
|
497 |
name: 'Buttons' |
|
747 | 498 |
layout: (LayoutFrame 130 0 -30 1 0 1 0 1) |
61 | 499 |
minorKey: buttonsSpec |
500 |
) |
|
747 | 501 |
(LinkButtonSpec |
502 |
label: 'Help' |
|
503 |
name: 'Help' |
|
504 |
layout: (LayoutFrame 30 0 -30 1 130 0 0 1) |
|
1109
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
505 |
style: (FontDescription helvetica medium roman 12 #'iso10646-1') |
977 | 506 |
initiallyInvisible: true |
507 |
foregroundColor: (Color 0.0 0.0 86.9993133440147) |
|
747 | 508 |
translateLabel: true |
509 |
model: doHelp |
|
510 |
) |
|
511 |
(MenuPanelSpec |
|
512 |
name: 'More' |
|
1109
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
513 |
layout: (LayoutFrame 0 0 -30 1 30 0 -50 1) |
747 | 514 |
level: 0 |
515 |
model: doInspect |
|
516 |
menu: actionsMenu |
|
517 |
) |
|
61 | 518 |
) |
519 |
||
520 |
) |
|
521 |
) |
|
1109
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
522 |
|
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
523 |
"Modified: / 10-07-2012 / 16:37:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
61 | 524 |
! ! |
525 |
||
747 | 526 |
!Dialog class methodsFor:'menu specs'! |
527 |
||
528 |
actionsMenu |
|
529 |
"This resource specification was automatically generated |
|
530 |
by the MenuEditor of ST/X." |
|
531 |
||
532 |
"Do not manually edit this!! If it is corrupted, |
|
533 |
the MenuEditor may not be able to read the specification." |
|
534 |
||
535 |
" |
|
536 |
MenuEditor new openOnClass:SVN::Dialog andSelector:#actionsMenu |
|
537 |
(Menu new fromLiteralArrayEncoding:(SVN::Dialog actionsMenu)) startUp |
|
538 |
" |
|
539 |
||
540 |
<resource: #menu> |
|
541 |
||
542 |
^ |
|
543 |
#(Menu |
|
544 |
( |
|
545 |
(MenuItem |
|
546 |
label: 'ActionsMenu' |
|
547 |
translateLabel: true |
|
548 |
submenu: |
|
549 |
(Menu |
|
550 |
( |
|
551 |
(MenuItem |
|
552 |
label: 'Catch exceptions' |
|
553 |
translateLabel: true |
|
554 |
indication: catchExceptionsAspect |
|
555 |
) |
|
556 |
(MenuItem |
|
557 |
label: 'Inspect model' |
|
558 |
itemValue: doInspect |
|
559 |
translateLabel: true |
|
560 |
) |
|
561 |
(MenuItem |
|
562 |
label: 'Inspect dialog' |
|
563 |
itemValue: doInspectDialog |
|
564 |
translateLabel: true |
|
565 |
) |
|
566 |
) |
|
567 |
nil |
|
568 |
nil |
|
569 |
) |
|
570 |
labelImage: (ResourceRetriever #'SVN::Dialog' downArrow) |
|
571 |
) |
|
572 |
) |
|
573 |
nil |
|
574 |
nil |
|
575 |
) |
|
576 |
! ! |
|
577 |
||
578 |
!Dialog class methodsFor:'others'! |
|
579 |
||
580 |
version_CVS |
|
826
6de72a06e3aa
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
747
diff
changeset
|
581 |
^ '$Header$' |
747 | 582 |
! ! |
583 |
||
61 | 584 |
!Dialog methodsFor:'accessing'! |
585 |
||
747 | 586 |
acceptButtonLabel |
587 |
^ 'OK' |
|
61 | 588 |
|
589 |
"Created: / 13-04-2008 / 11:06:41 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
590 |
! |
|
591 |
||
747 | 592 |
acceptEnabled |
593 |
^ self acceptEnabledHolder value |
|
61 | 594 |
|
595 |
"Created: / 16-08-2009 / 17:18:13 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
596 |
! |
|
597 |
||
747 | 598 |
acceptEnabled:aBoolean |
599 |
self acceptEnabledHolder value:aBoolean |
|
61 | 600 |
|
601 |
"Created: / 03-10-2008 / 14:29:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
602 |
! |
|
603 |
||
604 |
contentSpec |
|
605 |
||
606 |
^self contentSpecHolder value |
|
607 |
||
608 |
"Created: / 21-10-2008 / 12:39:50 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
609 |
! |
|
610 |
||
611 |
contentSpec: aSymbol |
|
612 |
||
613 |
self contentSpecHolder value: aSymbol |
|
614 |
||
615 |
"Created: / 21-10-2008 / 12:38:56 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
616 |
! |
|
617 |
||
618 |
info: aString |
|
619 |
||
620 |
^self infoHolder value: aString |
|
621 |
||
622 |
"Created: / 09-04-2009 / 08:00:37 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
623 |
! |
|
624 |
||
1109
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
625 |
infoPanel |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
626 |
infoPanel isNil ifTrue:[ |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
627 |
infoPanel := Tools::InlineMessageDialog new |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
628 |
]. |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
629 |
^ infoPanel |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
630 |
|
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
631 |
"Created: / 09-02-2012 / 19:23:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
632 |
! |
cee721f7119a
Improvements in revision log browser/dialog
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1003
diff
changeset
|
633 |
|
61 | 634 |
model |
635 |
^self modelHolder value |
|
636 |
||
637 |
"Modified: / 20-04-2005 / 18:59:28 / janfrog" |
|
638 |
"Created: / 12-04-2008 / 20:50:50 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
639 |
! |
|
640 |
||
641 |
model:aModel |
|
642 |
self modelHolder subjectChannel:aModel |
|
643 |
"aModel isValueModel |
|
644 |
ifTrue:[self modelHolder subjectChannel:aModel] |
|
645 |
ifFalse:[self modelHolder subject:aModel]." |
|
646 |
||
647 |
"Modified: / 20-04-2005 / 18:59:28 / janfrog" |
|
648 |
"Created: / 12-04-2008 / 20:50:50 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
649 |
! |
|
650 |
||
651 |
modelHolder |
|
652 |
^ modelHolder |
|
653 |
ifNil:[ |
|
654 |
modelHolder := (AspectAdaptor subjectChannel:self defaultModel) |
|
655 |
forAspect:#value |
|
656 |
] |
|
657 |
||
658 |
"Modified: / 20-04-2005 / 18:59:28 / janfrog" |
|
659 |
"Created: / 12-04-2008 / 20:50:50 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
660 |
"Modified: / 03-10-2008 / 14:57:35 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
661 |
! |
|
662 |
||
663 |
subtitle |
|
664 |
"return the value in 'dialogSubtitleHolder'" |
|
665 |
||
666 |
^ self subtitleHolder value |
|
667 |
||
668 |
"Created: / 22-10-2008 / 12:40:02 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
669 |
"Modified: / 09-04-2009 / 07:53:25 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
670 |
! |
|
671 |
||
672 |
subtitle:newValue |
|
673 |
"set the value in 'dialogSubtitleHolder'" |
|
674 |
||
675 |
self subtitleHolder value:' ' , newValue |
|
676 |
||
677 |
"Created: / 22-10-2008 / 12:40:14 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
678 |
"Modified: / 09-04-2009 / 07:53:18 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
679 |
! |
|
680 |
||
681 |
title |
|
682 |
||
683 |
^self dialogTitleAspect value |
|
684 |
||
685 |
"Created: / 22-10-2008 / 12:40:41 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
686 |
! |
|
687 |
||
688 |
title: aString |
|
689 |
||
690 |
^self titleHolder value: aString |
|
691 |
||
692 |
"Created: / 22-10-2008 / 12:40:49 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
693 |
"Modified: / 09-04-2009 / 14:12:49 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
694 |
! ! |
|
695 |
||
696 |
!Dialog methodsFor:'accessing - defaults'! |
|
697 |
||
698 |
defaultContentSpec |
|
699 |
||
700 |
^#contentSpec |
|
701 |
||
702 |
"Created: / 21-10-2008 / 12:35:11 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
703 |
! |
|
704 |
||
705 |
defaultModel |
|
706 |
^ nil |
|
707 |
||
708 |
"Created: / 03-10-2008 / 14:57:35 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
709 |
! |
|
710 |
||
711 |
defaultSubtitle |
|
712 |
||
713 |
^'' |
|
714 |
||
715 |
"Created: / 03-10-2008 / 13:54:08 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
716 |
! |
|
717 |
||
718 |
defaultTitle |
|
1003
f44ca95322e6
Improvements for CommitDialog2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
977
diff
changeset
|
719 |
^ 'Commit' |
61 | 720 |
|
721 |
"Created: / 03-10-2008 / 13:58:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1003
f44ca95322e6
Improvements for CommitDialog2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
977
diff
changeset
|
722 |
"Modified: / 08-02-2012 / 18:25:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
61 | 723 |
! ! |
724 |
||
725 |
!Dialog methodsFor:'actions'! |
|
726 |
||
727 |
doAccept |
|
747 | 728 |
self acceptEnabled ifTrue:[ |
729 |
super doAccept |
|
730 |
] |
|
61 | 731 |
|
732 |
"Created: / 16-08-2009 / 17:18:47 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
733 |
! |
|
734 |
||
735 |
doCancel |
|
736 |
||
747 | 737 |
"Terminate a worker process, if any" |
61 | 738 |
worker ifNotNil:[worker terminate]. |
747 | 739 |
"And close" |
61 | 740 |
super doCancel |
741 |
||
742 |
"Created: / 28-10-2008 / 14:47:44 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
747 | 743 |
! |
744 |
||
745 |
doHelp |
|
746 |
<resource: #uiCallback> |
|
747 |
||
748 |
Transcript showCR:self class name, ': action for doHelp ...'. |
|
749 |
! |
|
750 |
||
751 |
doInspect |
|
752 |
||
753 |
self model inspect |
|
754 |
! |
|
755 |
||
756 |
doInspectDialog |
|
757 |
||
758 |
self inspect |
|
759 |
||
760 |
"Created: / 10-03-2010 / 15:30:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
61 | 761 |
! ! |
762 |
||
763 |
!Dialog methodsFor:'aspects'! |
|
764 |
||
765 |
acceptButtonTitleAspect |
|
747 | 766 |
^ self acceptButtonLabel |
61 | 767 |
|
768 |
"Modified: / 31-03-2008 / 18:53:56 / janfrog" |
|
769 |
"Created: / 13-04-2008 / 11:08:43 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
770 |
! |
|
771 |
||
747 | 772 |
acceptEnabledHolder |
61 | 773 |
|holder| |
774 |
||
747 | 775 |
(holder := builder bindingAt:#acceptEnabledHolder) isNil ifTrue:[ |
61 | 776 |
holder := false asValue. |
747 | 777 |
builder aspectAt:#acceptEnabledHolder put:holder. |
61 | 778 |
]. |
747 | 779 |
^ holder. |
61 | 780 |
|
781 |
"Created: / 14-04-2008 / 11:17:10 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
782 |
"Modified: / 14-04-2008 / 12:56:08 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
783 |
! |
|
784 |
||
747 | 785 |
catchExceptionsAspect |
786 |
||
787 |
^(AspectAdaptor forAspect:#catchExceptions) |
|
788 |
subject: self class |
|
789 |
||
790 |
"Created: / 09-12-2009 / 16:23:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
791 |
! |
|
792 |
||
61 | 793 |
contentSpecHolder |
794 |
<resource: #uiAspect> |
|
795 |
||
796 |
|holder| |
|
797 |
||
798 |
(holder := builder bindingAt:#contentSpecHolder) isNil ifTrue:[ |
|
799 |
holder := self defaultContentSpec asValue. |
|
800 |
holder onChangeSend:#contentSpecChanged to: self. |
|
801 |
builder aspectAt:#contentSpecHolder put:holder. |
|
802 |
]. |
|
803 |
^ holder. |
|
804 |
||
805 |
"Created: / 21-10-2008 / 12:34:59 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
806 |
"Modified: / 22-10-2008 / 11:22:16 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
807 |
! |
|
808 |
||
809 |
dialogIconAspect |
|
810 |
^ self class dialogIcon |
|
811 |
||
812 |
"Created: / 13-04-2008 / 11:05:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
813 |
! |
|
814 |
||
815 |
infoHolder |
|
816 |
"return/create the 'infoHolder' value holder (automatically generated)" |
|
817 |
||
818 |
infoHolder isNil ifTrue:[ |
|
819 |
infoHolder := ValueHolder new. |
|
820 |
]. |
|
821 |
^ infoHolder |
|
822 |
! |
|
823 |
||
824 |
progressHolder |
|
825 |
<resource: #uiAspect> |
|
826 |
||
827 |
|holder| |
|
828 |
||
829 |
(holder := builder bindingAt:#progressHolder) isNil ifTrue:[ |
|
830 |
holder := nil asValue. |
|
831 |
builder aspectAt:#progressHolder put:holder. |
|
832 |
]. |
|
833 |
^ holder. |
|
834 |
||
835 |
"Created: / 21-10-2008 / 12:24:38 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
836 |
! |
|
837 |
||
838 |
subtitleHolder |
|
839 |
"return/create the valueHolder 'dialogSubtitleHolder'" |
|
840 |
||
841 |
subtitleHolder isNil ifTrue:[ |
|
842 |
subtitleHolder := self defaultSubtitle asValue |
|
843 |
]. |
|
844 |
^ subtitleHolder |
|
845 |
||
846 |
"Created: / 03-10-2008 / 13:53:16 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
847 |
"Modified: / 09-04-2009 / 07:53:51 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
848 |
! |
|
849 |
||
850 |
titleHolder |
|
851 |
titleHolder isNil ifTrue:[ |
|
852 |
titleHolder := self defaultTitle asValue. |
|
853 |
]. |
|
854 |
^titleHolder |
|
855 |
||
856 |
"Modified: / 31-03-2008 / 18:53:56 / janfrog" |
|
857 |
"Created: / 13-04-2008 / 11:05:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
858 |
"Modified: / 09-04-2009 / 07:52:33 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
859 |
! ! |
|
860 |
||
861 |
!Dialog methodsFor:'change & update'! |
|
862 |
||
863 |
contentSpecChanged |
|
864 |
||
865 |
self contentSpecChanged: self contentSpec |
|
866 |
||
867 |
"Created: / 22-10-2008 / 11:22:35 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
868 |
"Modified: / 06-11-2008 / 18:31:33 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
869 |
! |
|
870 |
||
871 |
contentSpecChanged: specSymbol |
|
872 |
||
873 |
"nothing to do here" |
|
874 |
||
875 |
"Created: / 06-11-2008 / 18:31:19 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
876 |
! ! |
|
877 |
||
747 | 878 |
!Dialog methodsFor:'events'! |
879 |
||
880 |
closeAccept |
|
881 |
||
882 |
[onAcceptBlock ifNotNil:[onAcceptBlock value: self]] |
|
883 |
ensure:[super closeAccept] |
|
884 |
! |
|
885 |
||
886 |
closeCancel |
|
887 |
||
888 |
[onCancelBlock ifNotNil:[onCancelBlock value: self]] |
|
889 |
ensure:[super closeCancel] |
|
890 |
! |
|
891 |
||
892 |
closeWindow |
|
893 |
||
894 |
worker |
|
895 |
ifNotNil:[worker addExitAction:[self closeWindow]] |
|
896 |
ifNil:[super closeWindow] |
|
897 |
||
898 |
"Created: / 01-11-2009 / 16:33:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
899 |
! ! |
|
900 |
||
61 | 901 |
!Dialog methodsFor:'hooks'! |
902 |
||
747 | 903 |
onAccept: aBlock |
904 |
||
905 |
onAcceptBlock := aBlock |
|
906 |
! |
|
907 |
||
908 |
onCancel: aBlock |
|
909 |
||
910 |
onCancelBlock := aBlock |
|
911 |
! |
|
912 |
||
61 | 913 |
postBuildProgressIndicator:aView |
914 |
<resource: #uiCallback> |
|
915 |
||
916 |
progressIndicator := aView |
|
917 |
||
918 |
"Modified: / 28-10-2008 / 12:50:51 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
919 |
! ! |
|
920 |
||
921 |
!Dialog methodsFor:'initialization'! |
|
922 |
||
923 |
initialize |
|
924 |
||
925 |
super initialize. |
|
926 |
self createBuilder |
|
927 |
||
928 |
"Created: / 22-10-2008 / 12:37:01 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
929 |
! ! |
|
930 |
||
747 | 931 |
!Dialog methodsFor:'private'! |
932 |
||
933 |
handleError: ex |
|
61 | 934 |
|
747 | 935 |
self class catchExceptions ifFalse:[ex pass]. |
936 |
self showError: ex description. |
|
937 |
||
938 |
"Created: / 09-12-2009 / 16:32:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
939 |
! |
|
940 |
||
941 |
handleNotification:ex |
|
61 | 942 |
|
747 | 943 |
self info:ex messageText. |
944 |
ex parameter isNumber |
|
945 |
ifTrue: |
|
946 |
[progressIndicator showBusyIndication:false. |
|
947 |
self progressHolder value:ex parameter] |
|
948 |
ifFalse: |
|
949 |
[progressIndicator showBusyIndication:true]. |
|
950 |
ex proceed. |
|
61 | 951 |
|
747 | 952 |
"Modified: / 09-12-2009 / 16:32:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
953 |
! |
|
954 |
||
955 |
handleUserConfirmation: ex |
|
61 | 956 |
|
747 | 957 |
^ex proceedWith: ex defaultAction |
958 |
||
959 |
"Created: / 09-12-2009 / 16:31:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
960 |
! |
|
61 | 961 |
|
962 |
showContent |
|
963 |
||
964 |
self |
|
965 |
contentSpec: #contentSpec. |
|
966 |
||
967 |
"Created: / 09-04-2009 / 08:14:36 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
968 |
! |
|
969 |
||
747 | 970 |
showError: aString |
971 |
||
972 |
self |
|
973 |
info: aString; |
|
974 |
contentSpec: #errorSpec |
|
975 |
||
976 |
"Created: / 09-12-2009 / 16:40:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
977 |
! |
|
978 |
||
61 | 979 |
showMessage: aString |
980 |
||
981 |
self |
|
982 |
info: aString; |
|
983 |
contentSpec: #messageSpec. |
|
984 |
||
985 |
"Created: / 09-04-2009 / 08:14:51 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
986 |
! |
|
987 |
||
747 | 988 |
showProgressWhile:aBlock |
989 |
|prevSpec| |
|
61 | 990 |
|
991 |
prevSpec := self contentSpec. |
|
747 | 992 |
self contentSpec:#progressSpec. |
993 |
worker := |
|
994 |
[[ aBlock on: UserConfirmation do: [:ex|self handleUserConfirmation: ex] ] |
|
995 |
on: (ActivityNotification , ProgressNotification) |
|
996 |
do: [:ex|self handleNotification: ex] |
|
997 |
on: Error |
|
998 |
do: [:ex|self handleError: ex]. |
|
999 |
worker := nil] newProcess. |
|
61 | 1000 |
worker |
747 | 1001 |
addExitAction:[ |
1002 |
self contentSpec == #progressSpec ifTrue:[ |
|
1003 |
self contentSpec:prevSpec |
|
1004 |
]. |
|
1005 |
worker := nil |
|
1006 |
]; |
|
61 | 1007 |
resume. |
1008 |
||
1009 |
"Created: / 21-10-2008 / 12:07:06 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1010 |
"Modified: / 09-04-2009 / 08:28:26 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
747 | 1011 |
"Modified: / 09-12-2009 / 16:42:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
61 | 1012 |
! ! |
1013 |
||
1014 |
!Dialog class methodsFor:'documentation'! |
|
1015 |
||
1016 |
version |
|
826
6de72a06e3aa
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
747
diff
changeset
|
1017 |
^ '$Header$' |
214 | 1018 |
! |
1019 |
||
1020 |
version_SVN |
|
826
6de72a06e3aa
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
747
diff
changeset
|
1021 |
^ '§Id: SVN__Dialog.st 363 2011-08-08 13:49:48Z vranyj1 §' |
61 | 1022 |
! ! |