--- a/MCSettingsApp.st Tue Mar 20 17:39:47 2012 +0100
+++ b/MCSettingsApp.st Wed Apr 04 12:32:31 2012 +0200
@@ -1,7 +1,7 @@
"{ Package: 'stx:goodies/monticello' }"
AbstractSettingsApplication subclass:#MCSettingsApp
- instanceVariableNames:'selectedRepositoryHolder'
+ instanceVariableNames:'mcRepositories selectedRepositoryHolder'
classVariableNames:''
poolDictionaries:''
category:'Monticello-St/X UI'
@@ -161,14 +161,14 @@
settingsApp := SettingsDialog new.
settingsApp addApplClass:self fullName
- withName:'Subversion'.
+ withName:'Monticello'.
settingsApp showRoot: false.
settingsApp selectedItem value:
(settingsApp applicationList root children anyOne).
settingsApp open.
"Created: / 26-05-2008 / 12:17:20 / Jan Vrany <vranyj1@fel.cvut.cz>"
- "Modified: / 27-02-2010 / 17:07:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 04-04-2012 / 11:17:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!MCSettingsApp class methodsFor:'interface specs'!
@@ -462,12 +462,13 @@
dialog accepted ifFalse:[^self].
repo := Compiler evaluate: codeHolder value.
self mcRepositories value add: repo.
+ self mcRepositories changed:#value.
self updateModifiedChannel
"Created: / 26-05-2008 / 12:04:30 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 16-08-2009 / 17:24:17 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified (format): / 01-12-2011 / 20:31:10 / cg"
- "Modified: / 23-01-2012 / 23:55:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 04-04-2012 / 11:14:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
defineAsPrimaryRepositoryAction
@@ -493,13 +494,14 @@
removeRepositoryAction
self repositoryConfiguration notNil ifTrue:[
- self repositoryConfigurationList remove: self repositoryConfiguration.
+ self mcRepositories value remove: self repositoryConfiguration.
+ self mcRepositories changed:#value.
self updateModifiedChannel
].
"Created: / 26-05-2008 / 12:04:10 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 01-12-2011 / 20:50:08 / cg"
- "Modified: / 23-01-2012 / 23:55:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 04-04-2012 / 11:15:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!MCSettingsApp methodsFor:'aspects'!
@@ -528,12 +530,12 @@
!
mcRepositories
-
- ^self settingsAspectFor: #mcRepositories default: OrderedCollection new
+ "return/create the 'mcRepositories' value holder (automatically generated)"
- "Created: / 16-09-2010 / 14:14:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 01-12-2011 / 20:08:34 / cg"
- "Modified: / 23-01-2012 / 23:59:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ mcRepositories isNil ifTrue:[
+ mcRepositories := ValueHolder new.
+ ].
+ ^ mcRepositories
!
selectedRepositoryHolder
@@ -566,12 +568,9 @@
!MCSettingsApp methodsFor:'protocol'!
basicReadSettings
- "/ special case, because default value of false is not ok here !!
- (currentUserPrefs includesKey:#mcRepositories) ifTrue:[
- self
- readAspects: #(mcRepositories)
- from:currentUserPrefs.
- ].
+
+ self mcRepositories value: MCRepositoryGroup default repositories copy.
+
"/ special case, because default value of false is not ok here !!
(currentUserPrefs includesKey:#mcPrimaryRepository) ifTrue:[
self
@@ -583,20 +582,22 @@
readAspects: #(mcEnabled)
from:currentUserPrefs.
- "Modified: / 16-09-2010 / 14:14:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 01-12-2011 / 20:26:23 / cg"
+ "Modified: / 04-04-2012 / 11:11:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
basicSaveSettings
self
- writeAspects: #(mcEnabled mcRepositories mcPrimaryRepository)
+ writeAspects: #(mcEnabled mcPrimaryRepository)
to:currentUserPrefs.
+ MCRepositoryGroup default repositories: self mcRepositories value copy
+
"Created: / 19-04-2008 / 09:42:59 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 25-05-2009 / 19:06:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
- "Modified: / 16-09-2010 / 14:35:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 01-12-2011 / 20:06:01 / cg"
+ "Modified: / 04-04-2012 / 11:24:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
helpFilename
@@ -613,14 +614,9 @@
!MCSettingsApp methodsFor:'queries'!
hasUnsavedChanges
- "/ special case, because default value of false is not ok here !!
- (currentUserPrefs includesKey:#mcRepositories) ifTrue:[
- (self
- hasChangedAspectIn: #(mcRepositories)
- asComparedTo:currentUserPrefs) ifTrue:[^ true].
- ] ifFalse:[
- self mcRepositories value notEmptyOrNil ifTrue:[^ true]
- ].
+
+ self mcRepositories value = MCRepositoryGroup default repositories ifFalse:[^true].
+
"/ special case, because default value of false is not ok here !!
(currentUserPrefs includesKey:#mcPrimaryRepository) ifTrue:[
(self
@@ -636,17 +632,17 @@
"Created: / 28-05-2008 / 07:33:26 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 19-08-2009 / 12:07:01 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 01-12-2011 / 20:27:34 / cg"
- "Modified: / 23-01-2012 / 23:57:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 04-04-2012 / 11:12:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!MCSettingsApp class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/goodies/monticello/MCSettingsApp.st,v 1.9 2012-01-24 00:06:45 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/monticello/MCSettingsApp.st,v 1.10 2012-04-04 10:32:31 vrany Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/goodies/monticello/MCSettingsApp.st,v 1.9 2012-01-24 00:06:45 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/monticello/MCSettingsApp.st,v 1.10 2012-04-04 10:32:31 vrany Exp $'
!
version_SVN