# HG changeset patch # User Claus Gittinger # Date 1346407454 -7200 # Node ID 4cc0095263310f6a3d13df8646a474904d853e33 # Parent 1d700354f0574413c0d5dcc160e66dbdd3a8cca4 class definition added: #findUniqueVersionNumber #postOpenWith: #updateVersionNumberTo: comment/format in: #updateAcceptEnabled changed: #repositoryChanged #repositoryList #workingCopyChanged diff -r 1d700354f057 -r 4cc009526331 MCCommitDialog.st --- a/MCCommitDialog.st Mon Aug 27 12:26:36 2012 +0200 +++ b/MCCommitDialog.st Fri Aug 31 12:04:14 2012 +0200 @@ -2,7 +2,7 @@ MCDialog subclass:#MCCommitDialog instanceVariableNames:'workingCopyHolder repositoryHolder versionNameHolder - messageHolder messageView' + messageHolder messageView versionNameFinderProcess' classVariableNames:'LastRepository' poolDictionaries:'' category:'Monticello-St/X UI' @@ -228,9 +228,12 @@ repositoryList - ^[MCRepositoryGroup default repositories] + ^[MCRepositoryGroup default repositories + , #(nil) + , (Array with:(resources string:'Add Repository...')) ] "Created: / 14-09-2010 / 23:16:46 / Jan Vrany " + "Modified: / 31-08-2012 / 11:39:42 / cg" ! versionNameHolder @@ -293,6 +296,24 @@ !MCCommitDialog methodsFor:'change & update'! +findUniqueVersionNumber + | wc versionName | + + self versionNameHolder value:('One Moment, please...' colorizeAllWith:Color grey). + + wc := self workingCopyHolder value. + self assert:wc notNil. + + self subtitle: wc package name. + versionName := wc uniqueVersionName. + self + enqueueMessage:#updateVersionNumberTo: + for:self + arguments: { versionName } + + "Created: / 31-08-2012 / 11:49:56 / cg" +! + messageChanged self halt @@ -301,10 +322,17 @@ ! repositoryChanged + self repositoryHolder value isString ifTrue:[ + MCSettingsApp open. + self repositoryHolder + value:(self repositoryList value first) + withoutNotifying:self. + ]. self updateAcceptEnabled "Created: / 15-09-2010 / 14:02:03 / Jan Vrany " + "Modified: / 31-08-2012 / 12:01:02 / cg" ! update:something with:aParameter from:changedObject @@ -332,27 +360,48 @@ ! updateAcceptEnabled + | enabled | - | enabled | enabled := true. enabled := enabled and:[self workingCopyHolder value notNil]. enabled := enabled and:[self repositoryHolder value notNil]. self acceptEnabledHolder value: enabled. "Created: / 15-09-2010 / 14:01:33 / Jan Vrany " + "Modified: / 31-08-2012 / 11:59:09 / cg" +! + +updateVersionNumberTo:versionName + self versionNameHolder value: versionName. + self updateAcceptEnabled + + "Created: / 31-08-2012 / 11:54:15 / cg" ! workingCopyChanged + |p| - | wc | - wc := self workingCopyHolder value. - wc ifNil:[^self]. - self subtitle: wc package name. - self versionNameHolder value: wc uniqueVersionName. - self updateAcceptEnabled + self window isNil ifTrue:[ + versionNameFinderProcess isNil ifTrue:[ + versionNameFinderProcess := + [ + self findUniqueVersionNumber. + ] fork. + ]. + ^ self. + ]. + + (self workingCopyHolder value) notNil ifTrue:[ + (p := versionNameFinderProcess) notNil ifTrue:[ + versionNameFinderProcess := nil. + p terminateAndWait. + ]. + self findUniqueVersionNumber. + ]. "Created: / 15-09-2010 / 09:30:17 / Jan Vrany " "Modified: / 15-09-2010 / 14:01:44 / Jan Vrany " + "Modified: / 31-08-2012 / 11:53:32 / cg" ! ! !MCCommitDialog methodsFor:'hooks'! @@ -367,11 +416,15 @@ !MCCommitDialog class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/goodies/monticello/MCCommitDialog.st,v 1.5 2012-07-24 15:34:22 cg Exp $' + ^ '$Header: /cvs/stx/stx/goodies/monticello/MCCommitDialog.st,v 1.6 2012-08-31 10:04:14 cg Exp $' ! version_CVS - ^ '$Header: /cvs/stx/stx/goodies/monticello/MCCommitDialog.st,v 1.5 2012-07-24 15:34:22 cg Exp $' + ^ '$Header: /cvs/stx/stx/goodies/monticello/MCCommitDialog.st,v 1.6 2012-08-31 10:04:14 cg Exp $' +! + +version_MC + ^ '§stx:goodies/monticello-cg.3 4e70fe70-f030-11e1-ac62-001f3bda2d09 2012-08-27T12:16:46 cg§' ! version_SVN