1 "{ Package: 'stx:goodies/monticello' }" |
1 "{ Package: 'stx:goodies/monticello' }" |
2 |
2 |
3 MCDialog subclass:#MCCommitDialog |
3 MCDialog subclass:#MCCommitDialog |
4 instanceVariableNames:'workingCopyHolder repositoryHolder versionNameHolder |
4 instanceVariableNames:'workingCopyHolder repositoryHolder versionNameHolder |
5 messageHolder messageView' |
5 messageHolder messageView versionNameFinderProcess' |
6 classVariableNames:'LastRepository' |
6 classVariableNames:'LastRepository' |
7 poolDictionaries:'' |
7 poolDictionaries:'' |
8 category:'Monticello-St/X UI' |
8 category:'Monticello-St/X UI' |
9 ! |
9 ! |
10 |
10 |
291 ]. |
294 ]. |
292 ! ! |
295 ! ! |
293 |
296 |
294 !MCCommitDialog methodsFor:'change & update'! |
297 !MCCommitDialog methodsFor:'change & update'! |
295 |
298 |
|
299 findUniqueVersionNumber |
|
300 | wc versionName | |
|
301 |
|
302 self versionNameHolder value:('One Moment, please...' colorizeAllWith:Color grey). |
|
303 |
|
304 wc := self workingCopyHolder value. |
|
305 self assert:wc notNil. |
|
306 |
|
307 self subtitle: wc package name. |
|
308 versionName := wc uniqueVersionName. |
|
309 self |
|
310 enqueueMessage:#updateVersionNumberTo: |
|
311 for:self |
|
312 arguments: { versionName } |
|
313 |
|
314 "Created: / 31-08-2012 / 11:49:56 / cg" |
|
315 ! |
|
316 |
296 messageChanged |
317 messageChanged |
297 |
318 |
298 self halt |
319 self halt |
299 |
320 |
300 "Created: / 15-09-2010 / 10:04:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
321 "Created: / 15-09-2010 / 10:04:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
301 ! |
322 ! |
302 |
323 |
303 repositoryChanged |
324 repositoryChanged |
|
325 self repositoryHolder value isString ifTrue:[ |
|
326 MCSettingsApp open. |
|
327 self repositoryHolder |
|
328 value:(self repositoryList value first) |
|
329 withoutNotifying:self. |
|
330 ]. |
304 |
331 |
305 self updateAcceptEnabled |
332 self updateAcceptEnabled |
306 |
333 |
307 "Created: / 15-09-2010 / 14:02:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
334 "Created: / 15-09-2010 / 14:02:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
335 "Modified: / 31-08-2012 / 12:01:02 / cg" |
308 ! |
336 ! |
309 |
337 |
310 update:something with:aParameter from:changedObject |
338 update:something with:aParameter from:changedObject |
311 "Invoked when an object that I depend upon sends a change notification." |
339 "Invoked when an object that I depend upon sends a change notification." |
312 |
340 |
330 |
358 |
331 "Modified: / 15-09-2010 / 14:02:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
359 "Modified: / 15-09-2010 / 14:02:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
332 ! |
360 ! |
333 |
361 |
334 updateAcceptEnabled |
362 updateAcceptEnabled |
335 |
|
336 | enabled | |
363 | enabled | |
|
364 |
337 enabled := true. |
365 enabled := true. |
338 enabled := enabled and:[self workingCopyHolder value notNil]. |
366 enabled := enabled and:[self workingCopyHolder value notNil]. |
339 enabled := enabled and:[self repositoryHolder value notNil]. |
367 enabled := enabled and:[self repositoryHolder value notNil]. |
340 self acceptEnabledHolder value: enabled. |
368 self acceptEnabledHolder value: enabled. |
341 |
369 |
342 "Created: / 15-09-2010 / 14:01:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
370 "Created: / 15-09-2010 / 14:01:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
371 "Modified: / 31-08-2012 / 11:59:09 / cg" |
|
372 ! |
|
373 |
|
374 updateVersionNumberTo:versionName |
|
375 self versionNameHolder value: versionName. |
|
376 self updateAcceptEnabled |
|
377 |
|
378 "Created: / 31-08-2012 / 11:54:15 / cg" |
343 ! |
379 ! |
344 |
380 |
345 workingCopyChanged |
381 workingCopyChanged |
346 |
382 |p| |
347 | wc | |
383 |
348 wc := self workingCopyHolder value. |
384 self window isNil ifTrue:[ |
349 wc ifNil:[^self]. |
385 versionNameFinderProcess isNil ifTrue:[ |
350 self subtitle: wc package name. |
386 versionNameFinderProcess := |
351 self versionNameHolder value: wc uniqueVersionName. |
387 [ |
352 self updateAcceptEnabled |
388 self findUniqueVersionNumber. |
|
389 ] fork. |
|
390 ]. |
|
391 ^ self. |
|
392 ]. |
|
393 |
|
394 (self workingCopyHolder value) notNil ifTrue:[ |
|
395 (p := versionNameFinderProcess) notNil ifTrue:[ |
|
396 versionNameFinderProcess := nil. |
|
397 p terminateAndWait. |
|
398 ]. |
|
399 self findUniqueVersionNumber. |
|
400 ]. |
353 |
401 |
354 "Created: / 15-09-2010 / 09:30:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
402 "Created: / 15-09-2010 / 09:30:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
355 "Modified: / 15-09-2010 / 14:01:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
403 "Modified: / 15-09-2010 / 14:01:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
404 "Modified: / 31-08-2012 / 11:53:32 / cg" |
356 ! ! |
405 ! ! |
357 |
406 |
358 !MCCommitDialog methodsFor:'hooks'! |
407 !MCCommitDialog methodsFor:'hooks'! |
359 |
408 |
360 postBuildMessageView: aView |
409 postBuildMessageView: aView |
365 ! ! |
414 ! ! |
366 |
415 |
367 !MCCommitDialog class methodsFor:'documentation'! |
416 !MCCommitDialog class methodsFor:'documentation'! |
368 |
417 |
369 version |
418 version |
370 ^ '$Header: /cvs/stx/stx/goodies/monticello/MCCommitDialog.st,v 1.5 2012-07-24 15:34:22 cg Exp $' |
419 ^ '$Header: /cvs/stx/stx/goodies/monticello/MCCommitDialog.st,v 1.6 2012-08-31 10:04:14 cg Exp $' |
371 ! |
420 ! |
372 |
421 |
373 version_CVS |
422 version_CVS |
374 ^ '$Header: /cvs/stx/stx/goodies/monticello/MCCommitDialog.st,v 1.5 2012-07-24 15:34:22 cg Exp $' |
423 ^ '$Header: /cvs/stx/stx/goodies/monticello/MCCommitDialog.st,v 1.6 2012-08-31 10:04:14 cg Exp $' |
|
424 ! |
|
425 |
|
426 version_MC |
|
427 ^ '§stx:goodies/monticello-cg.3 4e70fe70-f030-11e1-ac62-001f3bda2d09 2012-08-27T12:16:46 cg§' |
375 ! |
428 ! |
376 |
429 |
377 version_SVN |
430 version_SVN |
378 ^ '§Id: MCCommitDialog.st 12 2010-09-15 13:13:22Z vranyj1 §' |
431 ^ '§Id: MCCommitDialog.st 12 2010-09-15 13:13:22Z vranyj1 §' |
379 ! ! |
432 ! ! |