author | Claus Gittinger <cg@exept.de> |
Thu, 01 Dec 2011 20:51:03 +0100 | |
changeset 524 | 4d9d5926e014 |
parent 518 | 25286b5b0829 |
child 538 | 2e54a8a0a196 |
permissions | -rw-r--r-- |
320 | 1 |
"{ Package: 'stx:goodies/monticello' }" |
2 |
||
3 |
AbstractSettingsApplication subclass:#MCSettingsApp |
|
524 | 4 |
instanceVariableNames:'selectedRepositoryHolder' |
320 | 5 |
classVariableNames:'' |
6 |
poolDictionaries:'' |
|
7 |
category:'Monticello-St/X UI' |
|
8 |
! |
|
9 |
||
10 |
||
11 |
!MCSettingsApp class methodsFor:'help specs'! |
|
12 |
||
13 |
flyByHelpSpec |
|
14 |
||
15 |
<resource: #help> |
|
16 |
||
17 |
^self helpSpec |
|
18 |
||
19 |
"Created: / 26-05-2008 / 14:25:31 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
20 |
! |
|
21 |
||
22 |
helpSpec |
|
23 |
"This resource specification was automatically generated |
|
24 |
by the UIHelpTool of ST/X." |
|
25 |
||
26 |
"Do not manually edit this!! If it is corrupted, |
|
27 |
the UIHelpTool may not be able to read the specification." |
|
28 |
||
29 |
" |
|
524 | 30 |
UIHelpTool openOnClass:MCSettingsApp |
320 | 31 |
" |
32 |
||
33 |
<resource: #help> |
|
34 |
||
35 |
^ super helpSpec addPairsFrom:#( |
|
36 |
||
524 | 37 |
#addRepository |
38 |
'Add another monticello repository to the list' |
|
39 |
||
40 |
#makePrimaryRepository |
|
41 |
'Checkin from the browser will go into this repository by default' |
|
42 |
||
43 |
#removeRepository |
|
44 |
'Remove the selected repository from the list' |
|
320 | 45 |
|
46 |
) |
|
47 |
||
524 | 48 |
"Modified: / 01-12-2011 / 20:29:04 / cg" |
320 | 49 |
! ! |
50 |
||
51 |
!MCSettingsApp class methodsFor:'image specs'! |
|
52 |
||
53 |
defaultIcon |
|
518 | 54 |
"This resource specification was automatically generated |
55 |
by the ImageEditor of ST/X." |
|
320 | 56 |
|
518 | 57 |
"Do not manually edit this!! If it is corrupted, |
58 |
the ImageEditor may not be able to read the specification." |
|
59 |
||
60 |
" |
|
61 |
self defaultIcon inspect |
|
62 |
ImageEditor openOnClass:self andSelector:#defaultIcon |
|
63 |
Icon flushCachedIcons |
|
64 |
" |
|
65 |
||
66 |
<resource: #image> |
|
67 |
||
68 |
^Icon |
|
69 |
constantNamed:#'AbstractSettingsApplication::SourceCodeManagementSettingsAppl class defaultIcon' |
|
70 |
ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
71 |
@@@@@@@@@@@A@PHB@0P@@@@@@@@@@@@@@@@@@@HEA \HA $JB0HD@@@@@@@@@@@@@@HLA04NC0HD@@L@@ P@@@@@@@@@@@@ED@ NDP@@@@@@@@@D@@@@@@@@ |
|
72 |
@@@BA \FAPP@@@@@@@@@@@P@@@@@@@@@AQ@RC0@@@@@@@@@@@@@@@@@@@@@@@@TGA!!DD@@@@@@@@@@@@@@@@@@@D@PDIA08OA@@@@@@@@@@@@@@@@@@@AP S |
|
73 |
A0XIBPXGC0P@@@@@@@@@@@@@@@@ECAPLBPXOAP@@@@@@EQX@@@@@@@@@@@TIE@XOAP@@@@@@EQ\XE @@@@@@@@@@AP$OAP@@@@@@FQ\ZE!! V@@@@@@@@@@@E |
|
74 |
F0@@@@@@EQ\ZF!!(VFAX@@@@@@@@@@@@@@@@ZEQ\VE!!(ZF!!XWF @@@@@@@@@@@@@@@@@@@A\ZE!!(@@@@@@@@@@@@@@@@@@@@@@@@XE!!XZ@@@@@@@@@@@@@@@@ |
|
75 |
@@@@@@@@EQ(V@@@@@@@@@@@@@@@@@@@@@@@@EQ\VE @@@@@@@@@@@@@@@@@@@@@@EQ VE @@@@@@@@@@@@@@F @@@@@WEQ VE!!(@@@@@@@@@@@@@@@@@E!!\W |
|
76 |
EQXVE @@@@@@@@@@@@@@@@@@@@@@@A(Z@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 32 64 0 0 64 0 32 32 0 0 32 0 32 96 32 96 192 128 192 224 192 160 224 160 32 128 64 64 96 64 64 96 32 32 160 64 160 224 192 64 160 96 32 128 32 224 224 224 64 128 64 160 192 160 224 224 192 32 160 96 160 160 160 64 64 64 96 96 96 128 128 128 192 192 192 32 32 32 32 64 32]; mask:((ImageMask new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@O8@@?>@A??@A?C C<@0C8@PC8@@??@@??F@_>O@O<_ G8?0C1?8A#?<@C?<@@_@H@_@L@?@GC>@C?>@A?<@@_0@') ; yourself); yourself] |
|
320 | 77 |
|
78 |
"Created: / 26-05-2008 / 14:55:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
79 |
"Modified: / 16-09-2010 / 14:02:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
518 | 80 |
"Modified: / 25-11-2011 / 15:46:41 / cg" |
320 | 81 |
! |
82 |
||
83 |
svnIcon |
|
84 |
"^ IconLibrary svn_wizban" |
|
85 |
^nil |
|
86 |
||
87 |
"Created: / 24-05-2008 / 01:44:19 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
88 |
"Modified: / 16-09-2010 / 14:02:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
89 |
! ! |
|
90 |
||
91 |
!MCSettingsApp class methodsFor:'interface opening'! |
|
92 |
||
93 |
open |
|
94 |
||
95 |
| settingsApp | |
|
96 |
||
97 |
settingsApp := SettingsDialog new. |
|
98 |
settingsApp addApplClass:self fullName |
|
99 |
withName:'Subversion'. |
|
100 |
settingsApp showRoot: false. |
|
101 |
settingsApp selectedItem value: |
|
102 |
(settingsApp applicationList root children anyOne). |
|
103 |
settingsApp open. |
|
104 |
||
105 |
"Created: / 26-05-2008 / 12:17:20 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
106 |
"Modified: / 27-02-2010 / 17:07:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
107 |
! ! |
|
108 |
||
109 |
!MCSettingsApp class methodsFor:'interface specs'! |
|
110 |
||
111 |
windowSpec |
|
112 |
"This resource specification was automatically generated |
|
113 |
by the UIPainter of ST/X." |
|
114 |
||
115 |
"Do not manually edit this!! If it is corrupted, |
|
116 |
the UIPainter may not be able to read the specification." |
|
117 |
||
118 |
" |
|
119 |
UIPainter new openOnClass:MCSettingsApp andSelector:#windowSpec |
|
120 |
MCSettingsApp new openInterface:#windowSpec |
|
121 |
MCSettingsApp open |
|
122 |
" |
|
123 |
||
124 |
<resource: #canvas> |
|
125 |
||
126 |
^ |
|
127 |
#(FullSpec |
|
128 |
name: windowSpec |
|
129 |
window: |
|
130 |
(WindowSpec |
|
131 |
label: 'Monticello Settings' |
|
132 |
name: 'Monticello Settings' |
|
133 |
min: (Point 10 10) |
|
524 | 134 |
bounds: (Rectangle 0 0 647 627) |
320 | 135 |
) |
136 |
component: |
|
137 |
(SpecCollection |
|
138 |
collection: ( |
|
139 |
(LabelSpec |
|
140 |
label: ' Monticello Settings' |
|
141 |
name: 'Title' |
|
142 |
layout: (LayoutFrame 0 0 0 0 0 1 66 0) |
|
143 |
style: (FontDescription helvetica medium roman 18 #'iso10646-1') |
|
144 |
backgroundColor: (Color 100.0 100.0 100.0) |
|
145 |
translateLabel: true |
|
146 |
adjust: left |
|
147 |
) |
|
148 |
(LabelSpec |
|
149 |
label: 'Icon' |
|
150 |
name: 'Icon' |
|
151 |
layout: (LayoutFrame -75 1 0 0 0 1 66 0) |
|
152 |
initiallyInvisible: true |
|
153 |
hasCharacterOrientedLabel: false |
|
154 |
backgroundColor: (Color 100.0 100.0 100.0) |
|
155 |
translateLabel: true |
|
156 |
) |
|
157 |
(VerticalPanelViewSpec |
|
158 |
name: 'Controls' |
|
159 |
layout: (LayoutFrame 0 0 70 0 0 1 0 1) |
|
160 |
horizontalLayout: fit |
|
161 |
verticalLayout: topFit |
|
162 |
horizontalSpace: 3 |
|
163 |
verticalSpace: 3 |
|
164 |
component: |
|
165 |
(SpecCollection |
|
166 |
collection: ( |
|
167 |
(HorizontalPanelViewSpec |
|
168 |
name: 'EnabledAndResetPanel' |
|
169 |
horizontalLayout: rightSpaceFit |
|
170 |
verticalLayout: fit |
|
171 |
horizontalSpace: 0 |
|
172 |
verticalSpace: 3 |
|
173 |
component: |
|
174 |
(SpecCollection |
|
175 |
collection: ( |
|
176 |
(CheckBoxSpec |
|
177 |
label: 'Enable Monticello Manager' |
|
178 |
name: 'Enabled' |
|
179 |
model: mcEnabled |
|
180 |
translateLabel: true |
|
181 |
useDefaultExtent: true |
|
182 |
) |
|
183 |
(ActionButtonSpec |
|
184 |
label: 'Flush caches' |
|
185 |
name: 'ResetCachedRepositoriesButton' |
|
186 |
translateLabel: true |
|
187 |
model: flushCaches |
|
188 |
enableChannel: mcEnabled |
|
189 |
useDefaultExtent: true |
|
190 |
) |
|
191 |
) |
|
192 |
||
193 |
) |
|
194 |
useDefaultExtent: true |
|
195 |
) |
|
524 | 196 |
(ViewSpec |
197 |
name: 'Box1' |
|
198 |
component: |
|
199 |
(SpecCollection |
|
200 |
collection: ( |
|
201 |
(LabelSpec |
|
202 |
label: 'Primary Repository: ' |
|
203 |
name: 'Label2' |
|
204 |
layout: (LayoutFrame 7 0 0 0 150 0 22 0) |
|
205 |
translateLabel: true |
|
206 |
adjust: left |
|
207 |
) |
|
208 |
(LabelSpec |
|
209 |
name: 'Label3' |
|
210 |
layout: (LayoutFrame 150 0 0 0 0 1 22 0) |
|
211 |
translateLabel: true |
|
212 |
labelChannel: mcPrimaryRepository |
|
213 |
adjust: left |
|
214 |
) |
|
215 |
) |
|
216 |
||
217 |
) |
|
218 |
extent: (Point 647 24) |
|
219 |
) |
|
320 | 220 |
(FramedBoxSpec |
221 |
label: 'Repositories' |
|
222 |
name: 'Repositories' |
|
223 |
labelPosition: topLeft |
|
224 |
translateLabel: true |
|
225 |
component: |
|
226 |
(SpecCollection |
|
227 |
collection: ( |
|
228 |
(VerticalPanelViewSpec |
|
229 |
name: 'RepositoryConfigurations' |
|
230 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
231 |
horizontalLayout: fit |
|
232 |
verticalLayout: bottomFit |
|
233 |
horizontalSpace: 3 |
|
234 |
verticalSpace: 3 |
|
235 |
component: |
|
236 |
(SpecCollection |
|
237 |
collection: ( |
|
238 |
(ViewSpec |
|
239 |
name: 'RepositoryConfigurationListBox' |
|
240 |
model: mcRepositories |
|
241 |
component: |
|
242 |
(SpecCollection |
|
243 |
collection: ( |
|
244 |
(SelectionInListModelViewSpec |
|
245 |
name: 'RepositoryList' |
|
246 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
247 |
enableChannel: mcEnabled |
|
504
9cd65fe6164f
added: #selectedRepositoryHolder
Claus Gittinger <cg@exept.de>
parents:
461
diff
changeset
|
248 |
model: selectedRepositoryHolder |
320 | 249 |
hasHorizontalScrollBar: true |
250 |
hasVerticalScrollBar: true |
|
251 |
listModel: mcRepositories |
|
252 |
useIndex: false |
|
253 |
highlightMode: line |
|
254 |
) |
|
255 |
) |
|
256 |
||
257 |
) |
|
524 | 258 |
extent: (Point 613 437) |
320 | 259 |
) |
260 |
(HorizontalPanelViewSpec |
|
261 |
name: 'AddRemovePanel' |
|
262 |
horizontalLayout: fit |
|
263 |
verticalLayout: center |
|
264 |
horizontalSpace: 3 |
|
265 |
verticalSpace: 3 |
|
266 |
component: |
|
267 |
(SpecCollection |
|
268 |
collection: ( |
|
269 |
(ActionButtonSpec |
|
461 | 270 |
label: 'Add Repository...' |
320 | 271 |
name: 'AddConfigurationAction' |
524 | 272 |
activeHelpKey: addRepository |
320 | 273 |
translateLabel: true |
274 |
model: addRepositoryAction |
|
275 |
enableChannel: mcEnabled |
|
524 | 276 |
extent: (Point 151 25) |
320 | 277 |
) |
278 |
(ActionButtonSpec |
|
461 | 279 |
label: 'Remove Repository...' |
320 | 280 |
name: 'RemoveConfigurationAction' |
524 | 281 |
activeHelpKey: removeRepository |
320 | 282 |
translateLabel: true |
283 |
model: removeRepositoryAction |
|
524 | 284 |
enableChannel: mcEnabledAndRepositorySelectedHolder |
285 |
extent: (Point 151 25) |
|
286 |
) |
|
287 |
(LabelSpec |
|
288 |
name: 'Label1' |
|
289 |
translateLabel: true |
|
290 |
extent: (Point 151 22) |
|
291 |
) |
|
292 |
(ActionButtonSpec |
|
293 |
label: 'Define as Primary' |
|
294 |
name: 'Button1' |
|
295 |
activeHelpKey: makePrimaryRepository |
|
296 |
translateLabel: true |
|
297 |
model: defineAsPrimaryRepositoryAction |
|
298 |
enableChannel: mcEnabledAndRepositorySelectedHolder |
|
299 |
extent: (Point 151 25) |
|
320 | 300 |
) |
301 |
) |
|
302 |
||
303 |
) |
|
524 | 304 |
extent: (Point 613 30) |
320 | 305 |
) |
306 |
) |
|
307 |
||
308 |
) |
|
309 |
) |
|
310 |
) |
|
311 |
||
312 |
) |
|
524 | 313 |
extent: (Point 647 503) |
320 | 314 |
) |
315 |
) |
|
316 |
||
317 |
) |
|
318 |
) |
|
319 |
) |
|
320 |
||
321 |
) |
|
322 |
) |
|
323 |
! ! |
|
324 |
||
524 | 325 |
!MCSettingsApp class methodsFor:'queries'! |
326 |
||
327 |
managerTypeName |
|
328 |
||
329 |
^ 'Monticello' |
|
330 |
||
331 |
"Created: / 21-07-2011 / 11:47:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
332 |
! ! |
|
333 |
||
320 | 334 |
!MCSettingsApp methodsFor:'accessing'! |
335 |
||
336 |
repositoryConfiguration |
|
337 |
||
504
9cd65fe6164f
added: #selectedRepositoryHolder
Claus Gittinger <cg@exept.de>
parents:
461
diff
changeset
|
338 |
^self selectedRepositoryHolder value |
320 | 339 |
|
340 |
"Created: / 26-05-2008 / 12:04:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
504
9cd65fe6164f
added: #selectedRepositoryHolder
Claus Gittinger <cg@exept.de>
parents:
461
diff
changeset
|
341 |
"Modified: / 27-09-2011 / 11:55:22 / cg" |
320 | 342 |
! |
343 |
||
344 |
repositoryConfiguration: anObject |
|
345 |
||
504
9cd65fe6164f
added: #selectedRepositoryHolder
Claus Gittinger <cg@exept.de>
parents:
461
diff
changeset
|
346 |
self selectedRepositoryHolder value: anObject |
320 | 347 |
|
348 |
"Created: / 26-05-2008 / 12:12:17 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
504
9cd65fe6164f
added: #selectedRepositoryHolder
Claus Gittinger <cg@exept.de>
parents:
461
diff
changeset
|
349 |
"Modified: / 27-09-2011 / 11:55:24 / cg" |
320 | 350 |
! |
351 |
||
352 |
repositoryConfigurationList |
|
353 |
||
504
9cd65fe6164f
added: #selectedRepositoryHolder
Claus Gittinger <cg@exept.de>
parents:
461
diff
changeset
|
354 |
^self mcRepositories value |
320 | 355 |
|
356 |
"Created: / 26-05-2008 / 12:05:01 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
504
9cd65fe6164f
added: #selectedRepositoryHolder
Claus Gittinger <cg@exept.de>
parents:
461
diff
changeset
|
357 |
"Modified: / 27-09-2011 / 11:50:53 / cg" |
320 | 358 |
! |
359 |
||
360 |
repositoryManager |
|
361 |
||
362 |
^RepositoryManager current |
|
363 |
||
364 |
"Created: / 26-05-2008 / 10:46:30 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
365 |
! |
|
366 |
||
367 |
workingCopyBase |
|
368 |
||
369 |
^self workingCopyBaseAspect value |
|
370 |
||
371 |
"Created: / 26-05-2008 / 13:15:22 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
372 |
! ! |
|
373 |
||
374 |
!MCSettingsApp methodsFor:'actions'! |
|
375 |
||
376 |
addRepositoryAction |
|
524 | 377 |
| dialog class codeHolder repo | |
320 | 378 |
|
379 |
class := Dialog |
|
380 |
choose:'Select repository type' |
|
524 | 381 |
fromList:#('HTTP Repository' 'FTP Repository' 'Local Repository') |
382 |
values:(Array |
|
383 |
with: MCHttpRepository |
|
384 |
with: MCFtpRepository |
|
385 |
with: MCDirectoryRepository) |
|
320 | 386 |
lines:5 cancel:[^self]. |
387 |
||
388 |
codeHolder := ValueHolder new. |
|
524 | 389 |
dialog := Dialog |
390 |
forRequestText:'Please Fill in Data' |
|
391 |
lines:10 columns:60 |
|
392 |
initialAnswer: class creationTemplate |
|
393 |
model:codeHolder. |
|
320 | 394 |
dialog open. |
395 |
dialog accepted ifFalse:[^self]. |
|
396 |
repo := Compiler evaluate: codeHolder value. |
|
397 |
self mcRepositories value add: repo. |
|
398 |
self mcRepositories changed. |
|
399 |
||
400 |
"Created: / 26-05-2008 / 12:04:30 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
401 |
"Modified: / 16-08-2009 / 17:24:17 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
402 |
"Modified: / 16-09-2010 / 14:33:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
524 | 403 |
"Modified (format): / 01-12-2011 / 20:31:10 / cg" |
404 |
! |
|
405 |
||
406 |
defineAsPrimaryRepositoryAction |
|
407 |
self mcPrimaryRepository value:(self selectedRepositoryHolder value) |
|
408 |
||
409 |
"Created: / 01-12-2011 / 20:33:16 / cg" |
|
320 | 410 |
! |
411 |
||
412 |
flushCaches |
|
413 |
<resource: #uiCallback> |
|
414 |
||
415 |
"automatically generated by UIPainter..." |
|
416 |
||
417 |
"*** the code below performs no action" |
|
418 |
"*** (except for some feedback on the Transcript)" |
|
419 |
"*** Please change as required and accept in the browser." |
|
420 |
"*** (and replace this comment by something more useful ;-)" |
|
421 |
||
422 |
"action to be defined here..." |
|
423 |
||
424 |
Transcript showCR:self class name, ': action for flushCaches ...'. |
|
425 |
! |
|
426 |
||
427 |
removeRepositoryAction |
|
524 | 428 |
self repositoryConfiguration notNil ifTrue:[ |
429 |
self repositoryConfigurationList remove: self repositoryConfiguration. |
|
430 |
self mcRepositories changed. |
|
431 |
]. |
|
320 | 432 |
|
433 |
"Created: / 26-05-2008 / 12:04:10 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
524 | 434 |
"Modified: / 01-12-2011 / 20:50:08 / cg" |
320 | 435 |
! ! |
436 |
||
437 |
!MCSettingsApp methodsFor:'aspects'! |
|
438 |
||
439 |
mcEnabled |
|
524 | 440 |
^self settingsAspectFor: #mcEnabled default:false |
320 | 441 |
|
442 |
"Created: / 16-09-2010 / 14:14:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
524 | 443 |
"Modified: / 01-12-2011 / 20:08:10 / cg" |
444 |
! |
|
445 |
||
446 |
mcEnabledAndRepositorySelectedHolder |
|
447 |
^ BlockValue |
|
448 |
with:[:v | self mcEnabled value and:[ v notNil ]] |
|
449 |
argument:(self selectedRepositoryHolder) |
|
450 |
||
451 |
"Created: / 01-12-2011 / 19:58:57 / cg" |
|
452 |
! |
|
453 |
||
454 |
mcPrimaryRepository |
|
455 |
||
456 |
^self settingsAspectFor: #mcPrimaryRepository default:nil |
|
457 |
||
458 |
"Created: / 16-09-2010 / 14:14:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
459 |
"Created: / 01-12-2011 / 20:06:36 / cg" |
|
320 | 460 |
! |
461 |
||
462 |
mcRepositories |
|
463 |
||
524 | 464 |
^self settingsAspectFor: #mcRepositories default:nil |
320 | 465 |
|
466 |
"Created: / 16-09-2010 / 14:14:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
524 | 467 |
"Modified: / 01-12-2011 / 20:08:34 / cg" |
504
9cd65fe6164f
added: #selectedRepositoryHolder
Claus Gittinger <cg@exept.de>
parents:
461
diff
changeset
|
468 |
! |
9cd65fe6164f
added: #selectedRepositoryHolder
Claus Gittinger <cg@exept.de>
parents:
461
diff
changeset
|
469 |
|
9cd65fe6164f
added: #selectedRepositoryHolder
Claus Gittinger <cg@exept.de>
parents:
461
diff
changeset
|
470 |
selectedRepositoryHolder |
524 | 471 |
selectedRepositoryHolder isNil ifTrue:[ |
472 |
selectedRepositoryHolder := nil asValue. |
|
473 |
]. |
|
474 |
^ selectedRepositoryHolder |
|
504
9cd65fe6164f
added: #selectedRepositoryHolder
Claus Gittinger <cg@exept.de>
parents:
461
diff
changeset
|
475 |
|
524 | 476 |
"Created: / 01-12-2011 / 20:19:36 / cg" |
320 | 477 |
! ! |
478 |
||
479 |
!MCSettingsApp methodsFor:'helpers'! |
|
480 |
||
524 | 481 |
settingsAspectFor:settingName default:default |
320 | 482 |
|holder| |
483 |
||
484 |
self createBuilder. |
|
485 |
||
524 | 486 |
(holder := builder bindingAt:settingName) isNil ifTrue:[ |
487 |
holder := (currentUserPrefs at:settingName asSymbol ifAbsent:default) asValue. |
|
488 |
builder aspectAt:settingName put:holder. |
|
489 |
holder onChangeSend:#updateModifiedChannel to:self. |
|
320 | 490 |
]. |
491 |
^ holder. |
|
492 |
||
493 |
"Created: / 25-05-2009 / 18:43:42 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
524 | 494 |
"Created: / 01-12-2011 / 20:07:59 / cg" |
320 | 495 |
! ! |
496 |
||
497 |
!MCSettingsApp methodsFor:'protocol'! |
|
498 |
||
499 |
basicReadSettings |
|
524 | 500 |
"/ special case, because default value of false is not ok here !! |
501 |
(currentUserPrefs includesKey:#mcRepositories) ifTrue:[ |
|
502 |
self |
|
503 |
readAspects: #(mcRepositories) |
|
504 |
from:currentUserPrefs. |
|
505 |
]. |
|
506 |
"/ special case, because default value of false is not ok here !! |
|
507 |
(currentUserPrefs includesKey:#mcPrimaryRepository) ifTrue:[ |
|
508 |
self |
|
509 |
readAspects: #(mcPrimaryRepository) |
|
510 |
from:currentUserPrefs. |
|
511 |
]. |
|
320 | 512 |
|
513 |
self |
|
524 | 514 |
readAspects: #(mcEnabled) |
320 | 515 |
from:currentUserPrefs. |
516 |
||
517 |
"Modified: / 16-09-2010 / 14:14:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
524 | 518 |
"Modified: / 01-12-2011 / 20:26:23 / cg" |
320 | 519 |
! |
520 |
||
521 |
basicSaveSettings |
|
522 |
||
523 |
self |
|
524 | 524 |
writeAspects: #(mcEnabled mcRepositories mcPrimaryRepository) |
320 | 525 |
to:currentUserPrefs. |
526 |
||
527 |
"Created: / 19-04-2008 / 09:42:59 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
528 |
"Modified: / 25-05-2009 / 19:06:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
529 |
"Modified: / 16-09-2010 / 14:35:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
524 | 530 |
"Modified: / 01-12-2011 / 20:06:01 / cg" |
320 | 531 |
! |
532 |
||
533 |
helpFilename |
|
534 |
"subclasses must return the relative name of a helpFile |
|
535 |
in the doc/online/<language>/help directory. |
|
536 |
Or nil, if no help is available." |
|
537 |
||
538 |
^nil |
|
539 |
||
540 |
"Created: / 19-04-2008 / 09:42:59 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
541 |
"Modified: / 26-05-2008 / 13:12:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
542 |
! ! |
|
543 |
||
544 |
!MCSettingsApp methodsFor:'queries'! |
|
545 |
||
546 |
hasUnsavedChanges |
|
524 | 547 |
"/ special case, because default value of false is not ok here !! |
548 |
(currentUserPrefs includesKey:#mcRepositories) ifTrue:[ |
|
549 |
(self |
|
550 |
hasChangedAspectIn: #(mcRepositories) |
|
551 |
asComparedTo:currentUserPrefs) ifTrue:[^ true]. |
|
552 |
]. |
|
553 |
"/ special case, because default value of false is not ok here !! |
|
554 |
(currentUserPrefs includesKey:#mcPrimaryRepository) ifTrue:[ |
|
555 |
(self |
|
556 |
hasChangedAspectIn: #(mcPrimaryRepository) |
|
557 |
asComparedTo:currentUserPrefs) ifTrue:[^ true]. |
|
558 |
]. |
|
517 | 559 |
^ self |
524 | 560 |
hasChangedAspectIn: #(mcEnabled) |
517 | 561 |
asComparedTo:currentUserPrefs |
320 | 562 |
|
563 |
"Created: / 28-05-2008 / 07:33:26 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
564 |
"Modified: / 19-08-2009 / 12:07:01 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
565 |
"Modified: / 16-09-2010 / 14:17:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
524 | 566 |
"Modified: / 01-12-2011 / 20:27:34 / cg" |
320 | 567 |
! ! |
568 |
||
569 |
!MCSettingsApp class methodsFor:'documentation'! |
|
570 |
||
571 |
version |
|
524 | 572 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCSettingsApp.st,v 1.6 2011-12-01 19:51:03 cg Exp $' |
320 | 573 |
! |
574 |
||
575 |
version_CVS |
|
524 | 576 |
^ '$Header: /cvs/stx/stx/goodies/monticello/MCSettingsApp.st,v 1.6 2011-12-01 19:51:03 cg Exp $' |
320 | 577 |
! |
578 |
||
579 |
version_SVN |
|
580 |
^ '§Id: MCSettingsApp.st 33 2011-07-21 11:26:12Z vranyj1 §' |
|
581 |
! ! |