UserPreferences.st
branchjv
changeset 19967 9b1443c2aab1
parent 19945 9c7cd0ca7991
parent 19954 8ba5a0cbe56a
child 19968 beb0cbedcd3f
--- a/UserPreferences.st	Wed Jun 08 14:07:35 2016 +0100
+++ b/UserPreferences.st	Thu Jun 09 01:47:28 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1998 by eXept Software AG
 	      All Rights Reserved
@@ -63,79 +65,79 @@
 
 !UserPreferences class methodsFor:'initialization'!
 
-initializeDefaultPreferences
-    DefaultPreferences := self new.
-
+initializeDefaultsIn:preferences
     Color isNil "Smalltalk isStandAloneApp" ifTrue:[
-	^ self.
+        ^ self.
     ].
+    Color initialize.
 
     #(
-	#useNewChangesBrowser           false
-	#useNewInspector                false
-	#showClockInLauncher            true
-
-	#autoFormatting                 false
-	#syntaxColoring                 true
-	#fullSelectorCheck              false
-
-	#defaultSyntaxColor             (Color black)
-	#defaultSyntaxEmphasis          normal
-
-	#errorColor                     (Color red)
-
-	"/ #commentColor                   (Color 12.5 12.5 100)
-	#commentColor                   (Color 0 50 0)
-	#commentEmphasis                normal
-
-	#methodSelectorEmphasis         bold
-	#selectorEmphasis               bold
-	#unimplementedSelectorColor     (Color red)
-	#unimplementedSelectorEmphasis  normal
-
-	"/ I prefer red-underwave over red identifier ...
-	"/      #badIdentifierColor                 (Color red)
-	#instVarIdentifierColor         (Color 33 0 33)
-
-	"/ I prefer redish background
-	"/      #sideEffectAssignmentColor          (Color 75 0 0)
-	"/ #sideEffectAssignmentBackgroundColor    (Color 100 86 86)
-
-	#jsKeywordEmphasis              bold
-	"/ #jsKeywordColor                 (Color black)
-	#jsKeywordColor                 (Color 33 33 0)
-
-	#controlFlowSelectorColor       (Color 0 0 100)
-	#debugSelectorColor             (Color 80 0 0)
-	#errorRaisingSelectorColor      (Color 80 0 0)
-	"/ #constantColor                  (Color 25 0 0)
-	#constantColor                  (Color 64 8 8)
-
-	#globalIdentifierColor          (Color 67 0 67)
-	#unknownIdentifierColor         (Color 67 0 67)
-
-	#returnColor                    (Color 0 0 100)
-	#returnEmphasis                 bold
+        #useNewChangesBrowser           false
+        #useNewInspector                false
+        #showClockInLauncher            true
+
+        #autoFormatting                 false
+        #syntaxColoring                 true
+        #fullSelectorCheck              false
+
+        #defaultSyntaxColor             (Color black)
+        #defaultSyntaxEmphasis          normal
+
+        #errorColor                     (Color red)
+
+        "/ #commentColor                   (Color 12.5 12.5 100)
+        #commentColor                   (Color 0 50 0)
+        #commentEmphasis                normal
+
+        #methodSelectorEmphasis         bold
+        #selectorEmphasis               bold
+        #unimplementedSelectorColor     (Color red)
+        #unimplementedSelectorEmphasis  normal
+
+        "/ I prefer red-underwave over red identifier ...
+        "/      #badIdentifierColor                 (Color red)
+        #instVarIdentifierColor         (Color 33 0 33)
+
+        "/ I prefer redish background
+        "/      #sideEffectAssignmentColor          (Color 75 0 0)
+        "/ #sideEffectAssignmentBackgroundColor    (Color 100 86 86)
+
+        #jsKeywordEmphasis              bold
+        "/ #jsKeywordColor                 (Color black)
+        #jsKeywordColor                 (Color 33 33 0)
+
+        #controlFlowSelectorColor       (Color 0 0 100)
+        #debugSelectorColor             (Color 80 0 0)
+        #errorRaisingSelectorColor      (Color 80 0 0)
+        "/ #constantColor                  (Color 25 0 0)
+        #constantColor                  (Color 64 8 8)
+
+        #globalIdentifierColor          (Color 67 0 67)
+        #unknownIdentifierColor         (Color 67 0 67)
+
+        #returnColor                    (Color 0 0 100)
+        #returnEmphasis                 bold
      ) pairWiseDo:[:k :v |
-	DefaultPreferences at:k put:(v decodeAsLiteralArray).
+        preferences at:k put:(v decodeAsLiteralArray).
     ].
 
     "/ I prefer red-underwave over red identifier ...
-    DefaultPreferences at:#badIdentifierEmphasis put:(Array with:#underwave with:(#underlineColor->Color red)).
+    preferences at:#badIdentifierEmphasis put:(Array with:#underwave with:(#underlineColor->Color red)).
 
     "
      self initializeDefaultPreferences
     "
 
-    "Modified: / 16-03-2012 / 10:35:42 / cg"
+    "Created: / 06-06-2016 / 10:42:14 / cg"
 ! !
 
 !UserPreferences class methodsFor:'accessing'!
 
 current
     CurrentPreferences isNil ifTrue:[
-	CurrentPreferences := self new.
-	CurrentPreferences flyByHelpSettingChanged.
+        CurrentPreferences := self new.
+        self initializeDefaultsIn:CurrentPreferences.
+        CurrentPreferences flyByHelpSettingChanged.
     ].
     ^ CurrentPreferences.
 
@@ -144,17 +146,21 @@
     "
 
     "Modified: / 05-02-2015 / 07:08:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 06-06-2016 / 10:42:59 / cg"
 !
 
 default
     DefaultPreferences isNil ifTrue:[
-	self initializeDefaultPreferences
+        DefaultPreferences := self new.
+        self initializeDefaultsIn:DefaultPreferences
     ].
     ^ DefaultPreferences.
 
     "
      DefaultPreferences := nil.
     "
+
+    "Modified: / 06-06-2016 / 10:41:45 / cg"
 !
 
 reset
@@ -868,8 +874,6 @@
     ^ modified ? false
 ! !
 
-
-
 !UserPreferences methodsFor:'accessing-locale'!
 
 dateInputFormat
@@ -5138,7 +5142,7 @@
 
 functionKeySequences
     "return the collection of function-key macros.
-     Thats a dictionary, which assigns code to F-keys"
+     That's a dictionary, which assigns code to F-keys"
 
     ^ self at:#functionKeySequences ifAbsentPut:[Dictionary new]
 
@@ -5146,7 +5150,8 @@
      UserPreferences current functionKeySequences
     "
 
-    "Modified: / 11.9.1998 / 00:09:59 / cg"
+    "Modified: / 11-09-1998 / 00:09:59 / cg"
+    "Modified (comment): / 06-06-2016 / 10:43:30 / cg"
 !
 
 hideSupportCodeInDebugger