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