UserPreferences.st
author Stefan Vogel <sv@exept.de>
Sat, 30 Oct 2004 16:34:04 +0200
changeset 8625 0e0637c66519
parent 8619 03579873ab0d
child 8676 7466762d325e
permissions -rw-r--r--
*** empty log message ***

"
 COPYRIGHT (c) 1998 by eXept Software AG
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"


"{ Package: 'stx:libbasic' }"

IdentityDictionary subclass:#UserPreferences
	instanceVariableNames:''
	classVariableNames:'CurrentPreferences DefaultPreferences'
	poolDictionaries:''
	category:'System-Support'
!

!UserPreferences class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1998 by eXept Software AG
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

!

documentation
"
    A Dictionary for user preference values.
    For non-existing keys, either a defaultValue (false),
    or the value from a defaultDictionary is returned.

    This will eventually keep track of ALL user preferences.
    (which are currently spread over the system).
    For now, only a few preferences are found here - but this
    will change over time.

    UserPreferences current at:#foo
"
! !

!UserPreferences class methodsFor:'initialization'!

initializeDefaultPreferences
    DefaultPreferences := self new.

    #(
        #useNewChangesBrowser           false
        #useNewInspector                false

        #autoFormatting                 false
        #syntaxColoring                 true
        #fullSelectorCheck              false

        #defaultSyntaxColor             (Color black)
        #defaultSyntaxEmphasis          normal

        #errorColor                     (Color red)

        #commentColor                   (Color 12.5 12.5 100)
        #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)

        #constantColor                  (Color 25 0 0)

        #showClockInLauncher            true

"/        #jsKeywordColor                 (Color black)  
        #jsKeywordEmphasis              bold
        #jsKeywordColor                 (Color 33 33 0)  

     ) pairWiseDo:[:k :v |
        DefaultPreferences at:k put:v decodeAsLiteralArray.
    ].

"/ I prefer red-underwave over red identifier ...
    DefaultPreferences at:#badIdentifierEmphasis put:(Array with:#underwave with:(#underlineColor->Color red)).

    "
     self initializeDefaultPreferences
    "

    "Modified: / 4.2.2000 / 20:06:53 / cg"
! !

!UserPreferences class methodsFor:'accessing'!

current
    CurrentPreferences isNil ifTrue:[
        CurrentPreferences := self new.
        CurrentPreferences addAll:self default.
    ].
    ^ CurrentPreferences.

    "
     CurrentPreferences := nil
    "
!

default
    DefaultPreferences isNil ifTrue:[
	self initializeDefaultPreferences
    ].
    ^ DefaultPreferences.

    "
     DefaultPreferences := nil.
    "
!

reset
    "resets the CurrentPreferences to its default values"

    CurrentPreferences := nil
!

syntaxColorKeys
    "returns the keys of syntax color items"

    ^#(
        argumentIdentifierColor
          argumentIdentifierEmphasis
        booleanConstantColor
          booleanConstantEmphasis
        bracketColor
          bracketEmphasis
        classVariableIdentifierColor
          classVariableIdentifierEmphasis
        constantColor
          constantEmphasis
        commentColor
          commentEmphasis
        defaultSyntaxColor
          defaultSyntaxEmphasis
        errorColor
        globalIdentifierColor
          globalIdentifierEmphasis
        globalClassIdentifierColor
          globalClassIdentifierEmphasis
        hereColor
          hereEmphasis
        identifierColor
          identifierEmphasis
        instVarIdentifierColor
          instVarIdentifierEmphasis
        localIdentifierColor
          localIdentifierEmphasis
        methodSelectorColor
          methodSelectorEmphasis
        poolVariableIdentifierColor
          poolVariableIdentifierEmphasis
        returnColor
          returnEmphasis
        selectorColor
          selectorEmphasis
        selfColor
          selfEmphasis
        stringColor
          stringEmphasis
        superColor
          superEmphasis
        symbolColor
          symbolEmphasis
        thisContextColor
          thisContextEmphasis
        unknownIdentifierColor
          unknownIdentifierEmphasis
        unimplementedSelectorColor
          unimplementedSelectorEmphasis
    )

    "Modified: / 5.1.1980 / 00:48:09 / cg"
!

syntaxColorNames
    "returns the syntax colors for the settings in the launcher"

"/ warning, the strings below are presented to the user
"/ as the syntax-color boxes comboList - however, they are
"/ also used (without separators) as key into myself.
"/ Therefore, do not change the strings below.
"/ I know - this is bad coding ....

^#(
'Argument Identifier Color'
'Boolean Constant Color'
'Bracket Color'
'Class Variable Identifier Color'
'Constant Color'
'Comment Color'
'Global Identifier Color'
'Global Class Identifier Color'
'Here Color'
'Identifier Color'
'InstVar Identifier Color'
'Local Identifier Color'
'Method Selector Color'
'Pool Variable Identifier Color'
'Return Color'
'Selector Color'
'Self Color'
'String Color'
'Super Color'
'Symbol Color'
'This Context Color'
'Unknown Identifier Color'
'Unimplemented Selector Color'
)

    "Modified: / 5.1.1980 / 00:48:09 / cg"
! !

!UserPreferences class methodsFor:'accessing defaultPrefs'!

fileBrowserClass
    ^ self current fileBrowserClass

    "
     UserPreferences fileBrowserClass
    "
!

systemBrowserClass
    ^ self current systemBrowserClass

    "
     UserPreferences systemBrowserClass
    "
!

versionDiffViewerClass
    ^ self current versionDiffViewerClass

    "
     UserPreferences versionDiffViewerClass
    "
! !

!UserPreferences class methodsFor:'saving'!

saveSettings:userPrefs in:fileName
    "save settings to a settings-file."

    "a temporary kludge for old classVariable-based settings 
     - all of those MUST go into the user-preferences dictionary eventually"

    |s screen|

    s := fileName asFilename writeStream.
    s checkNilFileStream.

    screen := Screen current.

    s nextPutLine:'"/ ST/X saved settings';
      nextPutLine:'"/ DO NOT MODIFY MANUALLY';
      nextPutLine:'"/ (modifications would be lost with next save-settings)';
      nextPutLine:'"/';
      nextPutLine:'"/ this file was automatically generated by the';
      nextPutLine:'"/ ''save settings'' function of the SettingsDialog';
      nextPutLine:'"/'.
    s cr.

    s nextPutLine:'"/'.
    s nextPutLine:'"/ saved by ' , OperatingSystem getLoginName , '@' , OperatingSystem getHostName , ' at ' , Timestamp now printString.
    s nextPutLine:'"/'.
    s cr.

    s nextPutLine:'"/'.
    s nextPutLine:'"/ Display settings:'.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ only restore the display settings, if on the same Display ...'.
    s nextPutLine:'Display notNil ifTrue:['.
    s nextPutLine:' Display displayName = ' , (screen displayName storeString) , ' ifTrue:['.
      screen fixColors notNil ifTrue:[
        s nextPutLine:'  Image flushDeviceImages.'.
        s nextPutLine:'  Color colorAllocationFailSignal catch:['.
        s nextPutLine:'    Color getColorsRed:6 green:6 blue:4 on:Display'.
        s nextPutLine:'  ].'.
      ] ifFalse:[
        s nextPutLine:'  Display releaseFixColors.'.
      ].
      s nextPutLine:'  Display hasColors: ' , (screen hasColors storeString) , '.'.
      s nextPutLine:'  Display widthInMillimeter: ' , (screen widthInMillimeter storeString) , '.'.
      s nextPutLine:'  Display heightInMillimeter: ' , (screen heightInMillimeter storeString) , '.'.
      s nextPutLine:'  Display supportsDeepIcons: ' , (screen supportsDeepIcons storeString) , '.'.
      s nextPutLine:'  Image ditherAlgorithm: ' , (Image ditherAlgorithm storeString) , '.'.
      s nextPutLine:'  View defaultStyle:' , View defaultStyle storeString , '.'.
    s nextPutLine:' ].'.
    s nextPutLine:'].'.
    s cr.

    s nextPutLine:'"/'.
    s nextPutLine:'"/ Compiler settings:'.
    s nextPutLine:'"/'.
    s nextPutLine:'Compiler warnSTXSpecials: ' , (Compiler warnSTXSpecials storeString) , '.';
      nextPutLine:'Compiler warnUnderscoreInIdentifier: ' , (Compiler warnUnderscoreInIdentifier storeString) , '.';
      nextPutLine:'Compiler warnOldStyleAssignment: ' , (Compiler warnOldStyleAssignment storeString) , '.';
      nextPutLine:'Compiler warnCommonMistakes: ' , (Compiler warnCommonMistakes storeString) , '.';
      nextPutLine:'Compiler warnPossibleIncompatibilities: ' , (Compiler warnPossibleIncompatibilities storeString) , '.';
      nextPutLine:'Compiler allowUnderscoreInIdentifier: ' , (Compiler allowUnderscoreInIdentifier storeString) , '.';
      nextPutLine:'Compiler allowSqueakExtensions: ' , (Compiler allowSqueakExtensions storeString) , '.';
      nextPutLine:'Compiler allowDolphinExtensions: ' , (Compiler allowDolphinExtensions storeString) , '.';
      nextPutLine:'Compiler allowQualifiedNames: ' , (Compiler allowQualifiedNames storeString) , '.';
      nextPutLine:'Compiler arraysAreImmutable: ' , (Compiler arraysAreImmutable storeString) , '.';
      nextPutLine:'Compiler lineNumberInfo: ' , (Compiler lineNumberInfo storeString) , '.';

      nextPutLine:'Compiler foldConstants: ' , (Compiler foldConstants storeString) , '.';
      nextPutLine:'Compiler stcCompilation: ' , (Compiler stcCompilation storeString) , '.';
      nextPutLine:'OperatingSystem getOSType = ' , (OperatingSystem getOSType storeString) , ' ifTrue:[';
      nextPutLine:'  Compiler stcCompilationIncludes: ' , (Compiler stcCompilationIncludes storeString) , '.';
      nextPutLine:'  Compiler stcCompilationDefines: ' , (Compiler stcCompilationDefines storeString) , '.';
      nextPutLine:'  Compiler stcCompilationOptions: ' , (Compiler stcCompilationOptions storeString) , '.';
      nextPutLine:'  ' , (Compiler stcModulePath storeString) , ' asFilename exists ifTrue:[';
      nextPutLine:'    Compiler stcModulePath: ' , (Compiler stcModulePath storeString) , '.';
      nextPutLine:'  ].';
      nextPutLine:'  Compiler stcPath: ' , (Compiler stcPath storeString) , '.';
      nextPutLine:'  Compiler ccCompilationOptions: ' , (Compiler ccCompilationOptions storeString) , '.';
      nextPutLine:'  Compiler ccPath: ' , (Compiler ccPath storeString) , '.';
      nextPutLine:'  ObjectFileLoader linkArgs: ' , (ObjectFileLoader linkArgs storeString) , '.';
      nextPutLine:'  ObjectFileLoader linkCommand: ' , (ObjectFileLoader linkCommand storeString) , '.';
      nextPutLine:'  ObjectFileLoader libPath: ' , (ObjectFileLoader libPath storeString) , '.';
      nextPutLine:'  ObjectFileLoader searchedLibraries: ' , (ObjectFileLoader searchedLibraries storeString) , '.';
      nextPutLine:'].';

      nextPutLine:'ObjectMemory justInTimeCompilation: ' , (ObjectMemory justInTimeCompilation storeString) , '.';
      nextPutLine:'ObjectMemory fullSingleStepSupport: ' , (ObjectMemory fullSingleStepSupport storeString) , '.'.

    HistoryManager notNil ifTrue:[
        HistoryManager isActive ifTrue:[
            s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager activate].'.
            s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager fullHistoryUpdate:' , HistoryManager fullHistoryUpdate storeString , '].'.
        ] ifFalse:[
            s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager deactivate].'.
        ].
    ].

    ObjectFileLoader notNil ifTrue:[
        s nextPutLine:'ObjectFileLoader searchedLibraries: ' , (ObjectFileLoader searchedLibraries storeString) , '.'.
        s nextPutLine:'ObjectFileLoader libPath: ' , (ObjectFileLoader libPath storeString) , '.'.
    ].

    s nextPutLine:'Class catchMethodRedefinitions: ' , (Class catchMethodRedefinitions storeString) , '.'.
    s nextPutLine:'ClassCategoryReader sourceMode: ' , (ClassCategoryReader sourceMode storeString) , '.'.

    s cr.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ Info & Debug Messages:'.
    s nextPutLine:'"/'.
    s nextPutLine:'ObjectMemory infoPrinting: ' , (ObjectMemory infoPrinting storeString) , '.';
      nextPutLine:'ObjectMemory debugPrinting: ' , (ObjectMemory debugPrinting storeString) , '.';
      nextPutLine:'Object infoPrinting: ' , (Object infoPrinting storeString) , '.';
      nextPutLine:'DeviceWorkstation errorPrinting: ' , (DeviceWorkstation errorPrinting storeString) , '.'.

"/    FlyByHelp isActive ifTrue:[
"/        s nextPutLine:'FlyByHelp start.'
"/    ].

    s cr.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ Edit settings:'.
    s nextPutLine:'"/'.
    "/ s nextPutLine:'EditTextView st80Mode: ' , (EditTextView st80Mode storeString) , '.'.
    s nextPutLine:'TextView st80SelectMode: ' , (TextView st80SelectMode storeString) , '.'.
    s nextPutLine:'UserPreferences current syntaxColoring: ' , (userPrefs syntaxColoring storeString) , '.'.
    (ListView userDefaultTabPositions = ListView tab4Positions) ifTrue:[
        s nextPutLine:'ListView userDefaultTabPositions:(ListView tab4Positions).'.
    ] ifFalse:[
        s nextPutLine:'ListView userDefaultTabPositions:(ListView tab8Positions).'.
    ].

    s nextPutLine:'"/'.
    s nextPutLine:'"/ User preference values:'.
    s nextPutLine:'"/'.
    userPrefs keysAndValuesDo:[:k :v |
        (UserPreferences includesSelector:(k , ':') asSymbol) ifTrue:[
            s nextPutLine:'UserPreferences current ' , k , ':' , v storeString , '.'.
        ] ifFalse:[
            s nextPutLine:'UserPreferences current at:' , k storeString , ' put:' , v storeString , '.'.
        ]
    ].

    s cr.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ GC settings:'.
    s nextPutLine:'"/'.
    s nextPutLine:'ObjectMemory newSpaceSize: ' , (ObjectMemory newSpaceSize storeString) , '.';
      nextPutLine:'ObjectMemory dynamicCodeGCTrigger: ' , (ObjectMemory dynamicCodeGCTrigger storeString) , '.';
      nextPutLine:'ObjectMemory freeSpaceGCAmount: ' , (ObjectMemory freeSpaceGCAmount storeString) , '.';
      nextPutLine:'ObjectMemory freeSpaceGCLimit: ' , (ObjectMemory freeSpaceGCLimit storeString) , '.';
      nextPutLine:'ObjectMemory incrementalGCLimit: ' , (ObjectMemory incrementalGCLimit storeString) , '.';
      nextPutLine:'ObjectMemory oldSpaceCompressLimit: ' , (ObjectMemory oldSpaceCompressLimit storeString) , '.';
      nextPutLine:'ObjectMemory oldSpaceIncrement: ' , (ObjectMemory oldSpaceIncrement storeString) , '.'.

    s cr.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ Misc settings:'.
    s nextPutLine:'"/'.
    s nextPutLine:'Class keepMethodHistory: ' , (Class methodHistory notNil storeString) , '.';
      nextPutLine:'Smalltalk logDoits: ' , (Smalltalk logDoits storeString) , '.';
      nextPutLine:'Autoload compileLazy: ' , (Autoload compileLazy storeString) , '.';
      nextPutLine:'Smalltalk loadBinaries: ' , (Smalltalk loadBinaries storeString) , '.';
      nextPutLine:'StandardSystemView includeHostNameInLabel: ' , (StandardSystemView includeHostNameInLabel storeString) , '.';

      "/ claus - I dont think its a good idea to save those ...
      nextPutLine:'"/ Class updateChanges: ' , (Class updatingChanges storeString) , '.';

      nextPutLine:'ObjectMemory nameForChanges: ' , (ObjectMemory nameForChanges storeString) , '.';

      nextPutLine:'StandardSystemView returnFocusWhenClosingModalBoxes: ' , (StandardSystemView returnFocusWhenClosingModalBoxes storeString) , '.';
      nextPutLine:'StandardSystemView takeFocusWhenMapped: ' , (StandardSystemView takeFocusWhenMapped storeString) , '.';
      nextPutLine:'Display notNil ifTrue:[';
      nextPutLine:' Display activateOnClick: ' , ((screen activateOnClick:nil) storeString) , '.';
      nextPutLine:'].';
      nextPutLine:'MenuView showAcceleratorKeys: ' , (MenuView showAcceleratorKeys storeString) , '.';
      nextPutLine:'Class tryLocalSourceFirst: ' , (Class tryLocalSourceFirst storeString) , '.'.
    (NoHandlerError emergencyHandler == AbstractLauncherApplication notifyingEmergencyHandler) ifTrue:[
        s nextPutLine:'NoHandlerError emergencyHandler:(AbstractLauncherApplication notifyingEmergencyHandler).'.
    ].
    Processor isTimeSlicing ifTrue:[
        s nextPutLine:'Processor startTimeSlicing.'.
        s nextPutLine:('Processor supportDynamicPriorities:' , (Processor supportDynamicPriorities ? false) storeString , '.').
    ] ifFalse:[
        s nextPutLine:'Processor stopTimeSlicing.'.
    ].

    s cr.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ Printer settings:'.
    s nextPutLine:'"/'.
    s nextPutLine:'Printer := ' , (Printer name) , '.';
      nextPutLine:'Printer printCommand: ' , (Printer printCommand storeString) , '.'.

    Printer supportsPageSizes ifTrue:[
        s nextPutLine:'Printer pageFormat: ' , (Printer pageFormat storeString) , '.'.
        s nextPutLine:'Printer landscape: ' , (Printer landscape storeString) , '.'.
    ].
    Printer supportsMargins ifTrue:[
        s nextPutLine:'Printer topMargin: ' , (Printer topMargin storeString) , '.'.
        s nextPutLine:'Printer leftMargin: ' , (Printer leftMargin storeString) , '.'.
        s nextPutLine:'Printer rightMargin: ' , (Printer rightMargin storeString) , '.'.
        s nextPutLine:'Printer bottomMargin: ' , (Printer bottomMargin storeString) , '.'.
    ].
    Printer supportsPostscript ifTrue:[
        s nextPutLine:'Printer supportsColor: ' , (Printer supportsColor storeString) , '.'.
    ].

    s cr.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ Font settings:'.
    s nextPutLine:'"/ (only restored, if image is restarted on the same display)'.
    s nextPutLine:'"/'.
    s nextPutLine:'Display notNil ifTrue:['.
    s nextPutLine:' Display displayName = ' , (screen displayName storeString) , ' ifTrue:['.
    s nextPutLine:'  View defaultFont: ' , (View defaultFont storeString) , '.'.
    s nextPutLine:'  Label defaultFont: ' , (Label defaultFont storeString) , '.'.
    s nextPutLine:'  Button defaultFont: ' , (Button defaultFont storeString) , '.'.
    s nextPutLine:'  Toggle defaultFont: ' , (Toggle defaultFont storeString) , '.'.
    s nextPutLine:'  SelectionInListView defaultFont: ' , (SelectionInListView defaultFont storeString) , '.'.
    s nextPutLine:'  MenuView defaultFont: ' , (MenuView defaultFont storeString) , '.'.
    s nextPutLine:'  MenuPanel defaultFont: ' , (MenuPanel defaultFont storeString) , '.'.
    s nextPutLine:'  NoteBookView defaultFont: ' , (NoteBookView defaultFont storeString) , '.'.
    s nextPutLine:'  PullDownMenu defaultFont: ' , (PullDownMenu defaultFont storeString) , '.'.
    s nextPutLine:'  TextView defaultFont: ' , (TextView defaultFont storeString) , '.'.
    s nextPutLine:'  EditTextView defaultFont: ' , (EditTextView defaultFont storeString) , '.'.
    s nextPutLine:'  CodeView defaultFont: ' , (CodeView defaultFont storeString) , '.'.
    s nextPutLine:' ].'.
    s nextPutLine:'].'.

    s cr.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ Language setting:'.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ Notice:'.
    s nextPutLine:'"/   Language should be taken from the Environment Variable LANG'.
    s nextPutLine:'"/   To use the previous seting, uncomment the following:'.
    s nextPutLine:'"/ Smalltalk language: ' , (Smalltalk language storeString) , '.'.
    s nextPutLine:'"/ Smalltalk languageTerritory: ' , (Smalltalk languageTerritory storeString) , '.'.

    s cr.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ SourceCodeManager settings:'.
    s nextPutLine:'"/ (only restored, if image is restarted on the same host)'.
    s nextPutLine:'"/'.
    s nextPutLine:'OperatingSystem getHostName = ' , (OperatingSystem getHostName storeString) , ' ifTrue:['.
    s nextPutLine:'  Class tryLocalSourceFirst:' , Class tryLocalSourceFirst storeString , '.'.
    (Smalltalk at:#SourceCodeManager) == CVSSourceCodeManager ifTrue:[
    s nextPutLine:'  Smalltalk at:#SourceCodeManager put: CVSSourceCodeManager.'.
    s nextPutLine:'  AbstractSourceCodeManager cacheDirectoryName:' , AbstractSourceCodeManager cacheDirectoryName storeString , '.'.
    s nextPutLine:'  CVSSourceCodeManager cvsBinDirectory:' , CVSSourceCodeManager cvsBinDirectory storeString , '.'.
    s nextPutLine:'  CVSSourceCodeManager repositoryNamesPerModule:' , CVSSourceCodeManager repositoryNamesPerModule storeString , '.'.
    s nextPutLine:'  CVSSourceCodeManager initializeForRepository:' , CVSSourceCodeManager repositoryName storeString , '.'.
    ].
    s nextPutLine:'].'.

    s close.

    "
     Transcript topView application saveSettings
    "

    "Modified: / 6.1.1999 / 14:24:16 / cg"
! !

!UserPreferences methodsFor:'accessing'!

at:key put:value
    |classNameToCheck classToCheck|

    value == true ifTrue:[
        key == #useNewVersionDiffBrowser ifTrue:[
            classNameToCheck := #'VersionDiffBrowser'.
        ].
        key == #useNewChangesBrowser ifTrue:[
            classNameToCheck := #'NewChangesBrowser'.
        ].
        key == #useNewFileBrowser ifTrue:[
            classNameToCheck := #'FileBrowserV2'.
        ].
        key == #useNewSystemBrowser ifTrue:[
            classNameToCheck := #'Tools::NewSystemBrowser'.
        ].
        key == #useNewInspector ifTrue:[
            classNameToCheck := #'NewInspector::NewInspectorView'.
        ].
    ].

    classNameToCheck notNil ifTrue:[
        classToCheck := Smalltalk at:classNameToCheck.
        classToCheck isNil ifTrue:[
            ('UserPreferences [warning]: no class ' , classNameToCheck , ' class in system.') errorPrintCR.
        ] ifFalse:[
            Autoload autoloadFailedSignal handle:[:ex |
                'UserPreferences [warning]: autoload of ' , classNameToCheck , ' failed.' errorPrintCR.
            ] do:[
                classToCheck autoload.
            ]
        ]
    ].

    ^ super at:key put:value
! !

!UserPreferences methodsFor:'accessing-pref''d tools'!

changesBrowserClass
    self useNewChangesBrowser ifTrue:[
        ^ (NewChangesBrowser ? ChangesBrowser)
    ].
    ^ ChangesBrowser

    "Created: / 17.10.1998 / 14:37:46 / cg"
!

fileBrowserClass
    self useNewFileBrowser ifTrue:[
        ^ (FileBrowserV2 ? FileBrowser)
    ].
    ^ FileBrowser
!

flyByHelpActive

    ^ self at:#flyByHelpActive ifAbsentPut:(FlyByHelp notNil and:[FlyByHelp isActive])
!

flyByHelpActive:aBoolean
    aBoolean ~~ self flyByHelpActive ifTrue:[
        self at:#flyByHelpActive put:aBoolean.
        FlyByHelp notNil ifTrue:[
            aBoolean ifTrue:[
                FlyByHelp start.
            ] ifFalse:[
                FlyByHelp stop.
            ].
        ].
    ].
!

inspectorClassSetting
    self useNewInspector ifTrue:[
        ^ (NewInspector::NewInspectorView ? InspectorView)
    ].
    ^ InspectorView

    "Modified: / 12.11.2001 / 15:47:35 / cg"
    "Created: / 12.11.2001 / 15:49:00 / cg"
!

systemBrowserClass
    self useNewSystemBrowser ifTrue:[
        ^ ((Tools::NewSystemBrowser ? NewSystemBrowser) ? SystemBrowser)
    ].
    ^ SystemBrowser
!

useNewChangesBrowser
    "using new or old change browser"

    ^ self at:#useNewChangesBrowser ifAbsentPut:false

    "Modified: / 13.10.1998 / 15:53:05 / cg"
!

useNewChangesBrowser:aBoolean
    "using new or old changeBrowser"

    self at:#useNewChangesBrowser put:aBoolean

    "
     UserPreferences current useNewChangesBrowser
    "

    "Modified: / 13.10.1998 / 15:53:21 / cg"
!

useNewFileBrowser
    "using new or old version diff viewer"

    ^ self at:#useNewFileBrowser ifAbsentPut:(FileBrowserV2 notNil and:[FileBrowserV2 isLoaded])

    "Modified: / 13.10.1998 / 15:53:05 / cg"
!

useNewFileBrowser:aBoolean
    "using new or old file browser"

    self at:#useNewFileBrowser put:aBoolean

    "
     UserPreferences current useNewFileBrowser
    "

    "Modified: / 13.10.1998 / 15:53:21 / cg"
!

useNewFileDialog
    "using new or old file dialog"

    ^ self at:#useNewFileDialog ifAbsentPut:true
!

useNewFileDialog:aBoolean
    "using new or old file dialog"

    self at:#useNewFileDialog put:aBoolean

    "
     UserPreferences current useNewFileDialog:true
    "
!

useNewInspector
    "using new or old inspector"

    ^ self at:#useNewInspector ifAbsentPut:false

    "
     UserPreferences current useNewInspector
    "

    "Modified: / 17.10.1998 / 14:45:12 / cg"
!

useNewInspector:aBoolean
    "using new or old inspector"

    self at:#useNewInspector put:aBoolean

    "
     UserPreferences current useNewInspector
    "
!

useNewSettingsApplication
    "using one application for the settings"

    ^ self at:#useNewSettingsApplication ifAbsentPut:true
!

useNewSettingsApplication:aBoolean
    "using one application for the settings"

    self at:#useNewSettingsApplication put:aBoolean

    "
     UserPreferences current useNewSettingsApplication:true
    "

    "Modified: / 13.10.1998 / 15:53:21 / cg"
!

useNewSystemBrowser
    "using new or old system browser"

    |newSystemBrowserClass useIt|

    newSystemBrowserClass := (Tools::NewSystemBrowser ? NewSystemBrowser).
    useIt := self at:#useNewSystemBrowser ifAbsent:nil.
    useIt isNil ifTrue:[
        useIt := (newSystemBrowserClass notNil and:[ newSystemBrowserClass isLoaded]).
        useIt ifTrue:[
            self at:#useNewSystemBrowser put:true.
        ].
    ].
    ^ useIt 
!

useNewSystemBrowser:aBoolean
    "using new or old systemBrowser"

    self at:#useNewSystemBrowser put:aBoolean

    "
     UserPreferences current useNewSystemBrowser:true
    "

    "Modified: / 13.10.1998 / 15:53:21 / cg"
!

useNewVersionDiffBrowser
    "using new or old version diff viewer"

    ^ self at:#useNewVersionDiffBrowser ifAbsentPut:true

    "Modified: / 13.10.1998 / 15:53:05 / cg"
!

useNewVersionDiffBrowser:aBoolean
    "using new or old versionDiffBrowser"

    self at:#useNewVersionDiffBrowser put:aBoolean

    "
     UserPreferences current useNewVersionDiffBrowser
    "

    "Modified: / 13.10.1998 / 15:53:21 / cg"
!

useProcessMonitorV2
    "using ProcessMonitorV2 application for display Processes"

    ^ self at:#useProcessMonitorV2 ifAbsentPut:(ProcessMonitorV2 notNil and:[ ProcessMonitorV2 isLoaded ])
!

useProcessMonitorV2:aBoolean
    "using ProcessMonitorV2 application for display Processes"

    self at:#useProcessMonitorV2 put:aBoolean

    "
     UserPreferences current useProcessMonitorV2:true
    "

    "Modified: / 13.10.1998 / 15:53:21 / cg"
!

versionDiffViewerClass
    self useNewVersionDiffBrowser ifTrue:[
        ^ (VersionDiffBrowser ? DiffTextView)
    ].
    ^ DiffTextView
! !

!UserPreferences methodsFor:'accessing-prefs-UI'!

beepEnabled
    "return the flag which controls the beeper"

    ^ self at:#beepEnabled ifAbsentPut:true

    "
     UserPreferences current beepEnabled
    "

    "Modified: / 11.9.1998 / 00:09:59 / cg"
    "Created: / 3.12.1999 / 17:09:49 / ps"
!

beepEnabled:aBoolean
    "set/clear the flag which controls the beeper"

    ^ self at:#beepEnabled put:aBoolean

    "
     UserPreferences current beepEnabled:false
    "

    "Modified: / 11.9.1998 / 00:09:59 / cg"
    "Created: / 3.12.1999 / 17:10:27 / ps"
!

focusFollowsMouse
    "return the flag which controls if the keyboard focus should
     follow the mouse (as in X) - as opposed to click mode (as in MS-win).
     This only affects certain widgets (EditFields, EditTextViews and SelectionInListViews).
     The returned value has 3 states: true/false and nil, which means: as defined in styleSheet."

    ^ self at:#focusFollowsMouse ifAbsent:nil

    "
     UserPreferences current focusFollowsMouse
    "

    "Modified: / 11.9.1998 / 00:09:59 / cg"
!

focusFollowsMouse:aBooleanOrNil
    "set/clear the flag which controls if the keyboard focus should
     follow the mouse (as in X) - as opposed to click mode (as in MS-win).
     This only affects certain widgets (EditFields, EditTextViews and SelectionInListViews).
     Allowed are: true/false and nil, which means: as defined in styleSheet."

    ^ self at:#focusFollowsMouse put:aBooleanOrNil

    "
     UserPreferences current focusFollowsMouse:true
     UserPreferences current focusFollowsMouse:false
     UserPreferences current focusFollowsMouse
    "

    "Modified: / 11.9.1998 / 00:09:59 / cg"
!

opaqueTableColumnResizing
    "return the flag which controls if table column resizing should be done
     animated (opaque)"

    ^ self at:#opaqueTableColumnResizing ifAbsentPut:false

    "
     UserPreferences current opaqueTableColumnResizing
    "
!

opaqueTableColumnResizing:aBoolean
    "change the flag which controls if table column resizing should be done
     animated (opaque)"

    ^ self at:#opaqueTableColumnResizing put:aBoolean

    "
     UserPreferences current opaqueTableColumnResizing:true
    "

    "Modified: / 11.9.1998 / 00:09:59 / cg"
!

opaqueVariablePanelResizing
    "return the flag which controls if variable panel resizing should be done
     animated (opaque)"

    ^ self at:#opaqueVariablePanelResizing ifAbsentPut:false

    "
     UserPreferences current opaqueVariablePanelResizing
    "

    "Modified: / 11.9.1998 / 00:09:59 / cg"

!

opaqueVariablePanelResizing:aBoolean
    "change the flag which controls if variable panel resizing should be done
     animated (opaque)"

    ^ self at:#opaqueVariablePanelResizing put:aBoolean

    "
     UserPreferences current opaqueVariablePanelResizing:true
    "

    "Modified: / 11.9.1998 / 00:09:59 / cg"
!

searchDialogIsModal
    "true if the search dialog (in textViews) shall be modal (the default)"

    ^ self at:#searchDialogIsModal ifAbsent:true

    "
     UserPreferences current searchDialogIsModal
    "
!

searchDialogIsModal:aBooleanOrNil
    "true if the search dialog (in textViews) shall be modal (the default)"

    ^ self at:#searchDialogIsModal put:aBooleanOrNil

    "
     UserPreferences current searchDialogIsModal:true
     UserPreferences current searchDialogIsModal:false
     UserPreferences current searchDialogIsModal
    "
!

st80EditMode
    "editing as in st80 (do not allow cursor beyond endOfLine/endOftext)."

    ^ self at:#st80EditMode ifAbsent:false

    "
     UserPreferences current st80EditMode
    "
!

st80EditMode:aBoolean
    "editing as in st80 (do not allow cursor beyond endOfLine/endOftext)."

    ^ self at:#st80EditMode put:aBoolean

    "
     UserPreferences current st80EditMode:true
    "
!

startTextDragWithControl
    "if true, textDrag is only started when the CTRL-key is down"

    ^ self at:#startTextDragWithControl ifAbsent:true

    "
     UserPreferences current startTextDragWithControl
    "
!

startTextDragWithControl:aBooleanOrNil
    "if true, textDrag is only started when the CTRL-key is down"

    ^ self at:#startTextDragWithControl put:aBooleanOrNil

    "
     UserPreferences current startTextDragWithControl:true
     UserPreferences current startTextDragWithControl:false
     UserPreferences current startTextDragWithControl
    "
! !

!UserPreferences methodsFor:'accessing-prefs-browser'!

autoFormatting
    "return the flag which controls automatic formatting of code (in some browsers)
     Notice, the regular browser does not (yet) do automatic formating."

    ^ self at:#autoFormatting ifAbsent:false

    "
     UserPreferences current autoFormatting
    "

    "Created: / 4.2.2000 / 20:08:08 / cg"
    "Modified: / 5.2.2000 / 15:38:33 / cg"
!

autoFormatting:aBoolean
    "turn on/off automatic formatting of code (in some browsers);
     Notice, the regular browser does not (yet) do automatic formating."

    ^ self at:#autoFormatting put:aBoolean

    "
     UserPreferences current autoFormatting:true
     UserPreferences current autoFormatting:false
    "

    "Created: / 4.2.2000 / 20:08:26 / cg"
    "Modified: / 5.2.2000 / 15:38:20 / cg"
!

enforceCodeStyle
    "return the flag which controls enforcing a certain code style (in some browsers)"

    ^ self at:#enforceCodeStyle ifAbsent:false

    "
     UserPreferences current enforceCodeStyle
    "
!

generateComments
    "return true; comments shall be generated (by the codeGenerator tool)"

    ^ self at:#generateComments ifAbsent:true.

    "
     UserPreferences current generateComments
    "
!

generateCommentsForGetters
    "return true if comments for simple getters are to be generated (by the codeGenerator tool).
     The default is now false, as these look stupid in the browser and were only generated
     for the HTMLDocumentGenerator, which is not able  to generate these comments on the fly."

    ^ self generateComments and:[self at:#generateCommentsForGetters ifAbsent:false].

    "
     UserPreferences current generateCommentsForGetters
    "
!

generateCommentsForSetters
    "return true if comments for simple setters are to be generated (by the codeGenerator tool).
     The default is now false, as these look stupid in the browser and were only generated
     for the HTMLDocumentGenerator, which is not able  to generate these comments on the fly."

    ^ self generateComments and:[self at:#generateCommentsForSetters ifAbsent:false].

    "
     UserPreferences current generateCommentsForSetters
    "
!

syntaxColoring
    "return the flag which controls syntax coloring (in the browsers)"

    ^ self at:#syntaxColoring ifAbsent:true

    "
     UserPreferences current syntaxColoring
    "

    "Modified: / 11.9.1998 / 00:09:59 / cg"
!

syntaxColoring:aBoolean
    "turn on/off syntaxColoring (in the browsers)."

    ^ self at:#syntaxColoring put:aBoolean

    "
     UserPreferences current syntaxColoring:true
     UserPreferences current syntaxColoring:false
    "

    "Created: / 31.3.1998 / 13:44:00 / cg"
    "Modified: / 1.4.1998 / 13:23:03 / cg"
! !

!UserPreferences methodsFor:'accessing-prefs-browser-colors'!

emphasisForChangedCode
    |emp|

    emp := self at:#emphasisForChangedCode ifAbsent:nil.
    emp isNil ifTrue:[
        emp := #color->Color red darkened.
        "/ emp := #color->Color blue darkened.
        self at:#emphasisForChangedCode put:emp.
    ].
    ^ emp
!

emphasisForDifferentPackage
    |emp|

    emp := self at:#emphasisForDifferentPackage ifAbsent:nil.
    emp isNil ifTrue:[
        emp := #color->Color brown darkened.
        self at:#emphasisForDifferentPackage put:emp.
    ].
    ^ emp
!

emphasisForModifiedBuffer
    |emp|

    emp := self at:#emphasisForModifiedBuffer ifAbsent:nil.
    emp isNil ifTrue:[
        emp := #color->Color red darkened.
        self at:#emphasisForModifiedBuffer put:emp.
    ].
    ^ emp
!

emphasisForObsoleteCode
    |emp|

    emp := self at:#emphasisForObsoleteCode ifAbsent:nil.
    emp isNil ifTrue:[
        emp := #color->Color red.
        self at:#emphasisForObsoleteCode put:emp.
    ].
    ^ emp
!

emphasisForReadVariable
    |emp|

    emp := self at:#emphasisForReadVariable ifAbsent:nil.
    emp isNil ifTrue:[
        emp := #underline.
        self at:#emphasisForReadVariable put:emp.
    ].
    ^ emp
!

emphasisForWrittenVariable
    |emp|

    emp := self at:#emphasisForWrittenVariable ifAbsent:nil.
    emp isNil ifTrue:[
        emp := Array with:#underline with:#underlineColor->Color red.
        self at:#emphasisForWrittenVariable put:emp.
    ].
    ^ emp
! !

!UserPreferences methodsFor:'accessing-prefs-browser-syntaxColoring'!

argumentIdentifierColor
    "the color used for argument identifiers;
     If syntaxColoring is turned on."

    ^ self at:#argumentIdentifierColor ifAbsentPut:[self identifierColor]

    "Created: / 31.3.1998 / 15:08:20 / cg"
    "Modified: / 1.4.1998 / 13:19:58 / cg"
!

argumentIdentifierEmphasis
    "the emphasis used for argument identifiers;
     If syntaxColoring is turned on."

    ^ self at:#argumentIdentifierEmphasis ifAbsentPut:[self identifierEmphasis]

    "Created: / 31.3.1998 / 15:16:40 / cg"
    "Modified: / 1.4.1998 / 13:19:55 / cg"
!

badIdentifierColor
    "the color used for illegal identifiers;
     If syntaxColoring is turned on."

    ^ self at:#badIdentifierColor ifAbsentPut:[self identifierColor]

!

badIdentifierEmphasis
    "the emphasis used for illegal identifiers;
     If syntaxColoring is turned on."

    ^ self at:#badIdentifierEmphasis ifAbsentPut:[UserPreferences default at:#badIdentifierEmphasis]

    "Modified: / 7.7.1999 / 00:30:00 / cg"
!

booleanConstantColor
    "the color used for boolean constants;
     If syntaxColoring is turned on."

    ^ self at:#booleanConstantColor ifAbsentPut:[self constantColor]

    "Created: / 31.3.1998 / 18:12:06 / cg"
    "Modified: / 1.4.1998 / 13:20:07 / cg"
!

booleanConstantEmphasis
    "the emphasis used for boolean constants;
     If syntaxColoring is turned on."

    ^ self at:#booleanConstantEmphasis ifAbsentPut:[self constantEmphasis]

    "Created: / 31.3.1998 / 18:12:46 / cg"
    "Modified: / 1.4.1998 / 13:26:01 / cg"
!

bracketColor
    "the color used for brackets;
     If syntaxColoring is turned on."

    ^ self at:#bracketColor ifAbsentPut:[self defaultSyntaxColor]

    "
     self current at:#bracketColor  put:Color red.
     self current at:#bracketEmphasis  put:#bold

     self current bracketColor 
     self current bracketEmphasis 
    "

    "Created: / 31.3.1998 / 19:11:38 / cg"
    "Modified: / 1.4.1998 / 13:22:33 / cg"
!

bracketEmphasis
    "the emphasis used for brackets;
     If syntaxColoring is turned on."

    ^ self at:#bracketEmphasis ifAbsentPut:[self defaultSyntaxEmphasis]

    "
     self current at:#bracketEmphasis  put:#bold
     self current bracketEmphasis 
    "

    "Created: / 31.3.1998 / 19:11:38 / cg"
    "Modified: / 1.4.1998 / 13:22:33 / cg"
!

classVariableIdentifierColor
    "the color used for classVar/classInstVar identifiers
     If syntaxColoring is turned on."

    ^ self at:#classVariableIdentifierColor ifAbsentPut:[self globalIdentifierColor]

    "Modified: / 1.4.1998 / 13:20:47 / cg"
    "Created: / 4.3.1999 / 12:50:31 / cg"
!

classVariableIdentifierEmphasis
    "the color used for classVar/classInstVar identifiers
     If syntaxColoring is turned on."

    ^ self at:#classVariableIdentifierEmphasis ifAbsentPut:[self globalIdentifierEmphasis]

    "Modified: / 1.4.1998 / 13:20:47 / cg"
    "Created: / 4.3.1999 / 12:50:31 / cg"
!

commentColor
    "the color used for comments;
     If syntaxColoring is turned on."

    ^ self at:#commentColor ifAbsentPut:[UserPreferences default at:#commentColor]

    "Created: / 31.3.1998 / 15:10:23 / cg"
    "Modified: / 11.9.1998 / 19:24:04 / cg"
!

commentEmphasis
    "the emphasis used for comments;
     If syntaxColoring is turned on."

    ^ self at:#commentEmphasis ifAbsentPut:[UserPreferences default at:#commentEmphasis]

    "Created: / 31.3.1998 / 15:09:59 / cg"
    "Modified: / 1.4.1998 / 13:25:53 / cg"
!

commentEmphasisAndColor
    ^ Text addEmphasis:(self commentEmphasis) to:(#color->self commentColor).


!

constantColor
    "the color used for constants;
     If syntaxColoring is turned on."

    ^ self at:#constantColor ifAbsentPut:[UserPreferences default at:#constantColor]

    "Created: / 31.3.1998 / 18:13:15 / cg"
    "Modified: / 1.4.1998 / 13:20:37 / cg"
!

constantEmphasis
    "the emphasis used for constants;
     If syntaxColoring is turned on."

    ^ self at:#constantEmphasis ifAbsentPut:[self identifierEmphasis]

    "Created: / 31.3.1998 / 18:13:23 / cg"
    "Modified: / 1.4.1998 / 13:25:43 / cg"
!

defaultSyntaxColor
    "the color used for anything else;
     If syntaxColoring is turned on."

    ^ self at:#defaultSyntaxColor ifAbsentPut:[UserPreferences default at:#defaultSyntaxColor]

!

defaultSyntaxEmphasis
    "the emphasis used for anything else;
     If syntaxColoring is turned on."

    ^ self at:#defaultSyntaxEmphasis ifAbsentPut:[UserPreferences default at:#defaultSyntaxEmphasis]

!

doesNotUnderstand:aMessage
    |k def|

    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
    ].
"/    ((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)
"/        ].
"/    ].

    aMessage numArgs == 1 ifTrue:[
        ('UserPreferences [info]: obsolete settings key: ' , aMessage selector , ' - ignored.') infoPrintCR.
        ^ nil
    ].

    ^ super doesNotUnderstand:aMessage
!

errorColor
    "the color used for illegal identifiers;
     If syntaxColoring is turned on."

    ^ self at:#errorColor ifAbsentPut:[UserPreferences default at:#errorColor]

!

fullSelectorCheck
    "with fullSelector check, selectors are searched immediately for
     being implemented in the system. This may not be useful on slow machines"

    ^ self at:#fullSelectorCheck ifAbsentPut:[UserPreferences default at:#fullSelectorCheck]

    "Created: / 31.3.1998 / 15:09:41 / cg"
    "Modified: / 1.4.1998 / 13:25:06 / cg"
!

globalClassIdentifierColor
    "the color used for global identifiers which are known to be classes;
     If syntaxColoring is turned on."

    ^ self at:#globalClassIdentifierColor ifAbsentPut:[self globalIdentifierColor]

    "Modified: / 1.4.1998 / 13:20:47 / cg"
    "Created: / 4.3.1999 / 12:50:31 / cg"
!

globalClassIdentifierEmphasis
    "the emphasis used for global variable identifiers which are known to be classes;
     If syntaxColoring is turned on."

    ^ self at:#globalClassIdentifierEmphasis ifAbsentPut:[self globalIdentifierEmphasis]

    "Modified: / 1.4.1998 / 13:25:31 / cg"
    "Created: / 4.3.1999 / 12:51:00 / cg"
!

globalIdentifierColor
    "the color used for global identifiers;
     If syntaxColoring is turned on."

    ^ self at:#globalIdentifierColor ifAbsentPut:[self identifierColor]

    "Created: / 31.3.1998 / 15:18:49 / cg"
    "Modified: / 1.4.1998 / 13:20:47 / cg"
!

globalIdentifierEmphasis
    "the emphasis used for global variable identifiers;
     If syntaxColoring is turned on."

    ^ self at:#globalIdentifierEmphasis ifAbsentPut:[self identifierEmphasis]

    "Created: / 31.3.1998 / 15:18:29 / cg"
    "Modified: / 1.4.1998 / 13:25:31 / cg"
!

hereColor
    "the color used for the here pseudoVariable;
     If syntaxColoring is turned on."

    ^ self at:#hereColor ifAbsentPut:[self selfColor]

    "Created: / 31.3.1998 / 17:38:09 / cg"
    "Modified: / 1.4.1998 / 13:20:57 / cg"
!

hereEmphasis
    "the emphasis used for the hre special variable;
     If syntaxColoring is turned on."

    ^ self at:#hereEmphasis ifAbsentPut:[self selfEmphasis]

    "Created: / 31.3.1998 / 17:35:13 / cg"
    "Modified: / 1.4.1998 / 13:25:17 / cg"
!

identifierColor
    "the color used for other identifiers;
     If syntaxColoring is turned on."

    ^ self at:#identifierColor ifAbsentPut:[self defaultSyntaxColor]

    "
     UserPreferences current at:#identifierColor put:Color green darkened darkened.
     UserPreferences current at:#identifierColor put:Color black.
    "

    "Created: / 31.3.1998 / 17:35:55 / cg"
    "Modified: / 2.4.1998 / 10:39:42 / cg"
!

identifierEmphasis
    "the emphasis used for other identifiers;
     If syntaxColoring is turned on."

    ^ self at:#identifierEmphasis ifAbsentPut:[self defaultSyntaxEmphasis]

    "Created: / 31.3.1998 / 15:09:41 / cg"
    "Modified: / 1.4.1998 / 13:25:06 / cg"
!

instVarIdentifierColor
    "the color used for instance variable identifiers;
     If syntaxColoring is turned on."

    ^ self at:#instVarIdentifierColor ifAbsentPut:[self identifierColor]

    "
     UserPreferences current at:#instVarIdentifierColor put:Color green darkened.
     UserPreferences current at:#instVarIdentifierColor put:Color black.
     UserPreferences current instVarIdentifierColor 
    "

    "Created: / 16.4.1998 / 18:31:29 / cg"
    "Modified: / 16.4.1998 / 18:57:06 / cg"
!

instVarIdentifierEmphasis
    "the emphais used for instance variable identifiers;
     If syntaxColoring is turned on."

    ^ self at:#instVarIdentifierEmphasis ifAbsentPut:[self identifierEmphasis]

    "Modified: / 1.4.1998 / 13:24:42 / cg"
    "Created: / 16.4.1998 / 18:40:05 / cg"
!

jsKeywordColor
    ^ self at:#jsKeywordColor ifAbsentPut:[self defaultSyntaxColor]
!

jsKeywordEmphasis
    ^ self at:#jsKeywordEmphasis ifAbsentPut:[self defaultSyntaxEmphasis]
!

localIdentifierColor
    "the color used for local variable identifiers;
     If syntaxColoring is turned on."

    ^ self at:#localIdentifierColor ifAbsentPut:[self identifierColor]

    "
     UserPreferences current at:#localIdentifierColor put:Color green darkened.
     UserPreferences current at:#localIdentifierColor put:Color black.
    "

    "Created: / 31.3.1998 / 15:18:07 / cg"
    "Modified: / 2.4.1998 / 10:40:05 / cg"
!

localIdentifierEmphasis
    "the emphais used for local variable identifiers;
     If syntaxColoring is turned on."

    ^ self at:#localIdentifierEmphasis ifAbsentPut:[self identifierEmphasis]

    "Created: / 31.3.1998 / 15:16:56 / cg"
    "Modified: / 1.4.1998 / 13:24:42 / cg"
!

methodSelectorColor
    "the color used for a methods selector pattern;
     If syntaxColoring is turned on."

    ^ self at:#methodSelectorColor ifAbsentPut:[self defaultSyntaxColor]

    "Created: / 31.3.1998 / 15:11:24 / cg"
    "Modified: / 1.4.1998 / 13:24:26 / cg"
!

methodSelectorEmphasis
    "the emphasis used for a methods selector pattern;
     If syntaxColoring is turned on."

    ^ self at:#methodSelectorEmphasis ifAbsentPut:[UserPreferences default at:#methodSelectorEmphasis]

    "Created: / 31.3.1998 / 15:11:16 / cg"
    "Modified: / 1.4.1998 / 13:24:20 / cg"
!

poolVariableIdentifierColor
    "the color used for pool variable identifiers
     If syntaxColoring is turned on."

    ^ self at:#poolVariableIdentifierColor ifAbsentPut:[self globalIdentifierColor]
!

poolVariableIdentifierEmphasis
    "the color used for pool variable identifiers
     If syntaxColoring is turned on."

    ^ self at:#poolVariableIdentifierEmphasis ifAbsentPut:[self globalIdentifierEmphasis]
!

returnColor
    "the color used for the return expression;
     If syntaxColoring is turned on."

    ^ self at:#returnColor ifAbsentPut:[self defaultSyntaxColor]

    "Modified: / 5.1.1980 / 00:43:52 / cg"
!

returnEmphasis
    "the emphasis used for returns;
     If syntaxColoring is turned on."

    ^ self at:#returnEmphasis ifAbsentPut:[self defaultSyntaxEmphasis]

    "Created: / 5.1.1980 / 00:43:39 / cg"
!

selectorColor
    "the color used for message selectors;
     If syntaxColoring is turned on."

    ^ self at:#selectorColor ifAbsentPut:[self defaultSyntaxColor]

    "Created: / 31.3.1998 / 15:19:19 / cg"
    "Modified: / 1.4.1998 / 13:24:04 / cg"
!

selectorEmphasis
    "the emphasis used for message selectors;
     If syntaxColoring is turned on."

    ^ self at:#selectorEmphasis ifAbsentPut:[UserPreferences default at:#selectorEmphasis]

    "Created: / 31.3.1998 / 15:19:09 / cg"
    "Modified: / 1.4.1998 / 13:23:59 / cg"
!

selfColor
    "the color used for the self pseudoVariable;
     If syntaxColoring is turned on."

    ^ self at:#selfColor ifAbsentPut:[self identifierColor]

    "Created: / 31.3.1998 / 17:35:45 / cg"
    "Modified: / 1.4.1998 / 13:21:07 / cg"
!

selfEmphasis
    "the emphasis used for the self pseudoVariable;
     If syntaxColoring is turned on."

    ^ self at:#selfEmphasis ifAbsentPut:[self identifierEmphasis]

    "Created: / 31.3.1998 / 17:34:57 / cg"
    "Modified: / 1.4.1998 / 13:21:51 / cg"
!

stringColor
    "the color used for string constants;
     If syntaxColoring is turned on."

    ^ self at:#stringColor ifAbsentPut:[self constantColor]

    "Created: / 31.3.1998 / 15:19:50 / cg"
    "Modified: / 1.4.1998 / 13:22:06 / cg"
!

stringEmphasis
    "the emphasis used for string constants;
     If syntaxColoring is turned on."

    ^ self at:#stringEmphasis ifAbsentPut:[self constantEmphasis]

    "Created: / 31.3.1998 / 15:19:09 / cg"
    "Modified: / 1.4.1998 / 13:22:00 / cg"
!

superColor
    "the color used for the super pseudoVariable;
     If syntaxColoring is turned on."

    ^ self at:#superColor ifAbsentPut:[self selfColor]

    "Created: / 31.3.1998 / 17:37:56 / cg"
    "Modified: / 1.4.1998 / 13:21:15 / cg"
!

superEmphasis
    "the emphasis used for the super pseudoVariable;
     If syntaxColoring is turned on."

    ^ self at:#superEmphasis ifAbsentPut:[self selfEmphasis]

    "Created: / 31.3.1998 / 17:35:08 / cg"
    "Modified: / 1.4.1998 / 13:21:41 / cg"
!

symbolColor
    "the color used for symbol constants;
     If syntaxColoring is turned on."

    ^ self at:#symbolColor ifAbsentPut:[self constantColor]

    "Created: / 1.4.1998 / 12:57:35 / cg"
    "Modified: / 1.4.1998 / 13:22:16 / cg"
!

symbolEmphasis
    "the emphasis used for symbol constants;
     If syntaxColoring is turned on."

    ^ self at:#symbolEmphasis ifAbsentPut:[self constantEmphasis]

    "Created: / 1.4.1998 / 12:57:43 / cg"
    "Modified: / 1.4.1998 / 13:23:43 / cg"
!

thisContextColor
    "the color used for the thisContext pseudoVariable;
     If syntaxColoring is turned on."

    ^ self at:#thisContextColor ifAbsentPut:[self identifierColor]

    "Created: / 31.3.1998 / 17:37:49 / cg"
    "Modified: / 1.4.1998 / 13:21:24 / cg"
!

thisContextEmphasis
    "the emphasis used for the thisContext pseudoVariable;
     If syntaxColoring is turned on."

    ^ self at:#thisContextEmphasis ifAbsentPut:[self identifierEmphasis]

    "Created: / 31.3.1998 / 17:35:27 / cg"
    "Modified: / 1.4.1998 / 13:21:30 / cg"
!

unimplementedSelectorColor
    "the color used for bad message selectors;
     If syntaxColoring is turned on."

    ^ self at:#unimplementedSelectorColor ifAbsentPut:[UserPreferences default at:#unimplementedSelectorColor]
!

unimplementedSelectorEmphasis
    "the emphasis used for bad message selectors;
     If syntaxColoring is turned on."

    ^ self at:#unimplementedSelectorEmphasis ifAbsentPut:[UserPreferences default at:#unimplementedSelectorEmphasis]

    "Created: / 31.3.1998 / 15:19:09 / cg"
    "Modified: / 1.4.1998 / 13:23:59 / cg"
!

unknownIdentifierColor
    "the color used for unknown identifiers;
     If syntaxColoring is turned on."

    ^ self at:#unknownIdentifierColor ifAbsentPut:[self badIdentifierColor]

    "
     self current at:#unknownIdentifierColor  put:Color red.
     self current at:#unknownIdentifierEmphasis  put:#bold

     self current unknownIdentifierColor
     self current unknownIdentifierEmphasis
    "

    "Created: / 31.3.1998 / 19:11:38 / cg"
    "Modified: / 1.4.1998 / 13:22:33 / cg"
!

unknownIdentifierEmphasis
    "the emphasis used for unknown identifiers;
     If syntaxColoring is turned on."

    ^ self at:#unknownIdentifierEmphasis ifAbsentPut:[self badIdentifierEmphasis]

    "Created: / 31.3.1998 / 19:11:55 / cg"
    "Modified: / 1.4.1998 / 13:22:45 / cg"
! !

!UserPreferences methodsFor:'accessing-prefs-code'!

categoryForMenuActionsMethods
    ^ 'menu actions'.
! !

!UserPreferences methodsFor:'accessing-prefs-fileBrowser'!

filenameEntryFieldVisibleHolder
    "get the user preferences for show FileEntryField in FileBrowserV2"

    ^ self at:#filenameEntryFieldVisibleHolder ifAbsentPut:true

    "
     UserPreferences current filenameEntryFieldVisibleHolder
    "
!

filenameEntryFieldVisibleHolder:aBoolean
    "set/clear the user preferences for show FileEntryField in FileBrowserV2"

    ^ self at:#filenameEntryFieldVisibleHolder put:aBoolean
!

openAlwaysInTextEditor
    "get the user preferences for open every file in TextEditor 
     dont use e.g. HtmlEditor for *.html' in FileBrowserV2"

    ^ self at:#openAlwaysInTextEditor ifAbsentPut:false

    "
     UserPreferences current openAlwaysInTextEditor
    "
!

openAlwaysInTextEditor:aBoolean
    "set/clear the user preferences for open every file in TextEditor 
     dont use e.g. HtmlEditor for *.html' in FileBrowserV2"

    ^ self at:#openAlwaysInTextEditor put:aBoolean
!

openMultipleApplicationsForType
    "get the user preferences for open more applications for e.g. TextEditor 
     and not change the contents of already open TextEditor of FileBrowserV2"

    ^ self at:#openMultipleApplicationsForType ifAbsentPut:false

    "
     UserPreferences current openMultipleApplicationsForType
    "
!

openMultipleApplicationsForType:aBoolean
    "set/clear the user preferences for open more applications for e.g. TextEditor 
     and not change the contents of already open TextEditor of FileBrowserV2"

    ^ self at:#openMultipleApplicationsForType put:aBoolean
!

showDirectoryTree
    "get the user preferences for view directorie tree view in FileBrowserV2"

    ^ self at:#showDirectoryTree ifAbsentPut:true

    "
     UserPreferences current showDirectoryTree
    "
!

showDirectoryTree:aBoolean
    "set/clear the user preferences for view directorie tree view in FileBrowserV2"

    ^ self at:#showDirectoryTree put:aBoolean
!

showHiddenFiles
    "get the user preferences for showHiddenFiles in FileBrowserV2"

    ^ self at:#showHiddenFiles ifAbsentPut:true

    "
     UserPreferences current showHiddenFiles
    "
!

showHiddenFiles:aBoolean
    "set/clear the user preferences for showHiddenFiles in FileBrowserV2"


    ^ self at:#showHiddenFiles put:aBoolean
!

sortCaseless
    "get the user preferences for sort caseless in FileBrowserV2"

    ^ self at:#sortCaseless ifAbsentPut:true

    "
     UserPreferences current sortCaseless
    "
!

sortCaseless:aBoolean
    "set/clear the user preferences for sort caseless in FileBrowserV2"

    ^ self at:#sortCaseless put:aBoolean
!

sortDirectoriesBeforeFiles
    "get the user preferences for sort directories always before files in FileBrowserV2"

    ^ self at:#sortDirectoriesBeforeFiles ifAbsentPut:true

    "
     UserPreferences current sortDirectoriesBeforeFiles
    "
!

sortDirectoriesBeforeFiles:aBoolean
    "set/clear the user preferences for sort directories always before files in FileBrowserV2"

    ^ self at:#sortDirectoriesBeforeFiles put:aBoolean
!

toolBarVisibleHolder
    "get the user preferences for show ToolBar in FileBrowserV2"

    ^ self at:#toolBarVisibleHolder ifAbsentPut:true

    "
     UserPreferences current toolBarVisibleHolder
    "
!

toolBarVisibleHolder:aBoolean
    "set/clear the user preferences for show ToolBar in FileBrowserV2"

    ^ self at:#toolBarVisibleHolder put:aBoolean
!

viewDescription
    "get the user preferences for show file description row in DirectoryContentsBrowser 
     FileBrowserV2"

    ^ self at:#viewDescription ifAbsentPut:false

    "
     UserPreferences current viewDescription
    "
!

viewDescription:aBoolean
    "set/clear the user preferences for show file description row in 
     DirectoryContentsBrowser FileBrowserV2"


    ^ self at:#viewDescription put:aBoolean
!

viewDetails
    "get the user preferences for view more file properties in rows in DirectoryContentsBrowser 
     of FileBrowserV2"

    ^ self at:#viewDetails ifAbsentPut:false

    "
     UserPreferences current viewDetails
    "
!

viewDetails:aBoolean
    "set/clear the user preferences for view more file properties in rows in DirectoryContentsBrowser 
     of FileBrowserV2"


    ^ self at:#viewDetails put:aBoolean
!

viewDirectoryDescription
    "get the user preferences for auto open a TextView for Readme .. etc files 
     on change directory"

    ^ self at:#viewDirectoryDescription ifAbsentPut:false

    "
     UserPreferences current viewDirectoryDescription
    "
!

viewDirectoryDescription:aBoolean
    "set/clear the user preferences for auto open a TextView for Readme .. etc files 
     on change directory"


    ^ self at:#viewDirectoryDescription put:aBoolean
!

viewDirsInContentsBrowser
    "get the user preferences for view directories in contents browser in FileBrowserV2"

    ^ self at:#viewDirsInContentsBrowser ifAbsentPut:false

    "
     UserPreferences current viewDirsInContentsBrowser
    "
!

viewDirsInContentsBrowser:aBoolean
    "set/clear the user preferences for view directories in contents browser in FileBrowserV2"

    ^ self at:#viewDirsInContentsBrowser put:aBoolean
!

viewFilesInDirectoryTree
    "get the user preferences for view files in tree view (not only directories) of FileBrowserV2 
    "

    ^ self at:#viewFilesInDirectoryTree ifAbsentPut:false

    "
     UserPreferences current viewFilesInDirectoryTree
    "
!

viewFilesInDirectoryTree:aBoolean
    "set/clear the user preferences for view files in tree (not only directories) view of FileBrowserV2"

    ^ self at:#viewFilesInDirectoryTree put:aBoolean
!

viewGroup
    "get the user preferences for show group information row in 
     DirectoryContentsBrowser of FileBrowserV2"

    ^ self at:#viewGroup ifAbsentPut:false

    "
     UserPreferences current viewGroup
    "
!

viewGroup:aBoolean
    "set/clear the user preferences for show group information row in 
     DirectoryContentsBrowser of FileBrowserV2"


    ^ self at:#viewGroup put:aBoolean
!

viewOwner
    "get the user preferences for show owner information row in 
     DirectoryContentsBrowser of FileBrowserV2"

    ^ self at:#viewOwner ifAbsentPut:false

    "
     UserPreferences current viewOwner
    "
!

viewOwner:aBoolean
    "set/clear the user preferences for show owner information row in 
     DirectoryContentsBrowser of FileBrowserV2"


    ^ self at:#viewOwner put:aBoolean
!

viewPermissions
    "get the user preferences for show permissions information row in 
     DirectoryContentsBrowser of FileBrowserV2"

    ^ self at:#viewPermissions ifAbsentPut:false

    "
     UserPreferences current viewPermissions
    "
!

viewPermissions:aBoolean
    "set/clear the user permissions for show owner information row in 
     DirectoryContentsBrowser of FileBrowserV2"


    ^ self at:#viewPermissions put:aBoolean
!

viewPreview
    "get the user preferences for show image previev row in 
     DirectoryContentsBrowser of FileBrowserV2"

    ^ self at:#viewPreview ifAbsentPut:false

    "
     UserPreferences current viewPreview
    "
!

viewPreview:aBoolean
    "set/clear the user permissions for show image previev row in 
     DirectoryContentsBrowser of FileBrowserV2"


    ^ self at:#viewPreview put:aBoolean
!

viewSize
    "get the user preferences for show size information row in 
     DirectoryContentsBrowser of FileBrowserV2"

    ^ self at:#viewSize ifAbsentPut:false

    "
     UserPreferences current viewSize
    "
!

viewSize:aBoolean
    "set/clear the user permissions for show size information row in 
     DirectoryContentsBrowser of FileBrowserV2"


    ^ self at:#viewSize put:aBoolean
!

viewTime
    "get the user preferences for show time information row in 
     DirectoryContentsBrowser of FileBrowserV2"

    ^ self at:#viewTime ifAbsentPut:false

    "
     UserPreferences current viewSize
    "
!

viewTime:aBoolean
    "set/clear the user permissions for show time information row in 
     DirectoryContentsBrowser of FileBrowserV2"


    ^ self at:#viewTime put:aBoolean
!

viewType
    "get the user preferences for show txpe (suffix) information row in 
     DirectoryContentsBrowser of FileBrowserV2"

    ^ self at:#viewType ifAbsentPut:false

    "
     UserPreferences current viewType
    "
!

viewType:aBoolean
    "set/clear the user permissions for show type (suffix) information row in 
     DirectoryContentsBrowser of FileBrowserV2"


    ^ self at:#viewType put:aBoolean
! !

!UserPreferences methodsFor:'accessing-prefs-times'!

timeToAutoExpandItemsWhenDraggingOver
    "in a hierarchical tree view"

    ^ 700  "/ millis
!

twoDigitDateHandler
    "return a block which converts a two-digit date.
     Possible algorithms:
        - identity: treat as year 00..99
        - add 1900: treat as 1900..1999
        - around: treat as 1950..1999 if value is 50..99; 2000..2049 otherwise.

     TODO: make this configurable, keep in dictionary and add to settings.
    "

    ^ [:x | (x >= 50) ifTrue:[1900+x] ifFalse:[2000+x]].
    "/ ^ [:x | 1900+x].
    "/ ^ [:x | x].
! !

!UserPreferences methodsFor:'accessing-prefs-tools'!

allowSendMailFromDebugger
    "if true inserts a button in Debugger for open a GUI to send useful debugger infos per mail to a default
     mail account "

    ^ self at:#allowSendMailFromDebugger ifAbsent:true

    "
     UserPreferences current allowSendMailFromDebugger
    "

    "Modified: / 11.9.1998 / 00:09:59 / cg"
!

allowSendMailFromDebugger:aBoolean
    "if true inserts a button in Debugger for open a GUI to send useful debugger infos per mail to a default
     mail account "

    ^ self at:#allowSendMailFromDebugger put:aBoolean

    "
     UserPreferences current allowSendMailFromDebugger:true
     UserPreferences current allowSendMailFromDebugger:false
    "
!

autoDefineWorkspaceVariables
    "return the flag which controls automatic definition of unknown variables
     as workspace variables (in doIts)"

    ^ self at:#autoDefineWorkspaceVariables ifAbsentPut:false

    "
     UserPreferences current autoDefineWorkspaceVariables
    "
!

autoDefineWorkspaceVariables:aBoolean
    "turn on/off automatic definition of unknown variables
     as workspace variables (in doIts)"

    ^ self at:#autoDefineWorkspaceVariables put:aBoolean

    "
     UserPreferences current autoDefineWorkspaceVariables:true
     UserPreferences current autoDefineWorkspaceVariables:false
    "
!

functionKeySequences
    "return the collection of function-key macros.
     Thats a dictionary, which assigns code to F-keys"

    ^ self at:#functionKeySequences ifAbsentPut:[Dictionary new]

    "
     UserPreferences current functionKeySequences
    "

    "Modified: / 11.9.1998 / 00:09:59 / cg"
!

showClockInLauncher
    "return the flag which controls if a clock is shown in the launcher"

    ^ self at:#showClockInLauncher ifAbsentPut:false

    "
     UserPreferences current showClockInLauncher
    "

    "Modified: / 11.9.1998 / 00:09:59 / cg"
!

showClockInLauncher:aBooleanOrNil
    "set/clear the flag which controls if a clock is shown in the launcher"

    ^ self at:#showClockInLauncher put:aBooleanOrNil

    "
     UserPreferences current showClockInLauncher:false.
     NewLauncher open.   

     UserPreferences current showClockInLauncher:true.
     NewLauncher open.   
    "

    "Modified: / 11.9.1998 / 00:09:59 / cg"
!

useRefactoringSupport
    "return the flag which enables/disables use of refactoring package in browser.
     If enabled, this enables all kinds of refactorings, better search and undo features.
     There is usually no reason to disable these."

    ^ self at:#useRefactoringSupport ifAbsentPut:true
!

useRefactoringSupport:aBooleanOrNil
    "enable/disable use of refactoring package in browser.
     If enabled, this enables all kinds of refactorings, better search and undo features.
     There is usually no reason to disable these."

    ^ self at:#useRefactoringSupport put:aBooleanOrNil

    "
     UserPreferences current useRefactoringSupport:false
     UserPreferences current useRefactoringSupport:true
    "
! !

!UserPreferences methodsFor:'default settings'!

listOfPredefinedSyntaxColoringSchemes
    "return a list of pre-defined syntax highlightning styles
     (as shown in the Launchers 'source and debugger settings' dialog."

    ^ #(
            (#resetSyntaxColors                             'default')
            (#resetSyntaxColorsGreenComments                'green comments')
            (#resetSyntaxColorsBlueSelectorsGreenComments   'blue selectors; green comments [dolphin style]')
            (#resetSyntaxColorsBlueSelectorsGreyComments    'blue selectors; grey comments')
            (#resetSyntaxColorsAllBlackExceptBadIDs         'no colors, but highlight errors')
      )
!

resetSyntaxColors
    "resets the colors in the CurrentPreferences to their default values"

    self class syntaxColorKeys do:[:k | self removeKey:k ifAbsent:nil].


!

resetSyntaxColorsAllBlackExceptBadIDs
    "resets the colors in the CurrentPreferences to no-color mode,
     except for bad identifiers, which are underwaved."

    self class syntaxColorKeys do:[:k | self removeKey:k ifAbsent:nil].
    self at:#badIdentifierEmphasis  put:(Array with:#underwave with:(#underlineColor->Color red)).
    self at:#errorColor             put:Color black.
    self at:#commentColor           put:Color black.
    self at:#constantColor          put:Color black.
    self at:#methodSelectorEmphasis put:#normal.
    self at:#selectorEmphasis       put:#normal.
!

resetSyntaxColorsBlueSelectorsGreenComments
    "resets the colors in the CurrentPreferences to alternative default values
     (with blue selectors and green comments)"

    self class syntaxColorKeys do:[:k | self removeKey:k ifAbsent:nil].
    self at:#commentColor           put:(Color green darkened).
    self at:#commentEmphasis        put:#italic.
    self at:#selectorColor          put:(Color blue).
    self at:#selectorEmphasis       put:#normal.
    self at:#methodSelectorColor    put:(Color blue).
    self at:#methodSelectorEmphasis put:#bold.
!

resetSyntaxColorsBlueSelectorsGreyComments
    "resets the colors in the CurrentPreferences to alternative default values
     (with blue selectors and grey comments)"

    self resetSyntaxColorsBlueSelectorsGreenComments.
    self at:#commentColor    put:(Color gray).
!

resetSyntaxColorsGreenComments
    "resets the colors in the CurrentPreferences to alternative default values
     (with green comments)"

    self class syntaxColorKeys do:[:k | self removeKey:k ifAbsent:nil].
    self at:#commentColor put:(Color green darkened).

! !

!UserPreferences methodsFor:'default values'!

defaultValue
    "the defaultValue for non-existing keys"

    ^ false
!

errorKeyNotFound:aKey
    "for any non-existing key, false is returned"

    ^ self defaultValue
! !

!UserPreferences methodsFor:'obsolete'!

useNewSettinsApplication
    "obsolete - will be removed in next release.
     (this is kept for a while, as it may have found its way into some
      saved user preference files)"

    self obsoleteMethodWarning.
    ^ self useNewSettingsApplication
!

useNewSettinsApplication:aBoolean
    "obsolete - will be removed in next release"

    self obsoleteMethodWarning.
    self useNewSettingsApplication:aBoolean.
! !

!UserPreferences methodsFor:'saving'!

saveIn:fileName
    self class saveSettings:self in:fileName
! !

!UserPreferences class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic/UserPreferences.st,v 1.149 2004-10-19 07:15:44 cg Exp $'
! !