UserPreferences.st
changeset 13597 1d17dd4b5fda
parent 13596 219fd211bc2d
child 13652 af8438e37bd6
--- a/UserPreferences.st	Fri Aug 19 12:52:14 2011 +0200
+++ b/UserPreferences.st	Fri Aug 19 14:03:39 2011 +0200
@@ -2246,30 +2246,36 @@
 
     k := aMessage selector.
     aMessage numArgs == 0 ifTrue:[
-	(self includesKey:k) ifTrue:[
-	    ^ self at:k
-	].
-	((def := self class default) includesKey:k) ifTrue:[
-	    ^ def at:k
-	].
-	^ self defaultValue
+        (self includesKey:k) ifTrue:[
+            ^ self at:k
+        ].
+        ((def := self class default) includesKey:k) ifTrue:[
+            ^ def at:k
+        ].
+        ^ self defaultValue
     ].
-"/    ((aMessage numArgs == 1)
-"/    and:[ (k endsWith:$:)])
-"/    ifTrue:[
-"/        k := (k copyWithoutLast:1) asSymbol.
-"/        ((self includesKey:k)
-"/        or:[ self class default includesKey:k ]) ifTrue:[
-"/            ^ self at:k put:(aMessage arg1)
-"/        ].
-"/    ].
+
+    "/ this is needed, if a setting is loaded (via the settings.stx) at a time
+    "/ when the corresponding package which uses that setting is not yet loaded;
+    "/ for example: libsvn settings, with no libsvn being present.
+    "/ if obsolete keys accumulate over time, we might need a settings cleanup GUI to
+    "/ care for that.
+
+    ((aMessage numArgs == 1)
+    and:[ (k endsWith:$:)])
+    ifTrue:[
+        k := (k copyWithoutLast:1) asSymbol.
+        ^ self at:k put:(aMessage arg1)
+    ].
 
     aMessage numArgs == 1 ifTrue:[
-	('UserPreferences [info]: obsolete settings key: ' , aMessage selector , ' - ignored.') infoPrintCR.
-	^ nil
+        ('UserPreferences [info]: obsolete settings key: ' , aMessage selector , ' - ignored.') infoPrintCR.
+        ^ nil
     ].
 
     ^ super doesNotUnderstand:aMessage
+
+    "Modified (comment): / 19-08-2011 / 14:01:56 / cg"
 !
 
 emphasis:e andColor:c
@@ -3446,8 +3452,6 @@
     "Created: / 19-08-2011 / 12:51:58 / cg"
 ! !
 
-
-
 !UserPreferences methodsFor:'default settings - syntax colors'!
 
 listOfPredefinedSyntaxColoringSchemes
@@ -3668,7 +3672,7 @@
 !UserPreferences class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/UserPreferences.st,v 1.286 2011-08-19 10:52:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UserPreferences.st,v 1.287 2011-08-19 12:03:39 cg Exp $'
 !
 
 version_SVN