equal
deleted
inserted
replaced
650 |
650 |
651 "Created: / 07-06-2017 / 11:46:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
651 "Created: / 07-06-2017 / 11:46:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
652 "Modified (comment): / 07-06-2017 / 13:25:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
652 "Modified (comment): / 07-06-2017 / 13:25:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
653 ! |
653 ! |
654 |
654 |
|
655 saveSettings: anUsrrPreferences |
|
656 "Save given user preferences back to file. If preferences |
|
657 are not associated with a backing file (such as when |
|
658 preferences were not loaded from a file), an error is |
|
659 thrown to prevent accidental overwrite. You may use |
|
660 #saveSettings:in: for overwrite any file. |
|
661 " |
|
662 | file | |
|
663 |
|
664 file := anUsrrPreferences |
|
665 at: #settingsFilename |
|
666 ifAbsent:[ self error: 'No backing file associated with preferences object' ]. |
|
667 self saveSettings: anUsrrPreferences in: file. |
|
668 |
|
669 "Created: / 19-01-2019 / 14:22:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
670 ! |
|
671 |
655 saveSettings:userPrefs in:fileNameOrString |
672 saveSettings:userPrefs in:fileNameOrString |
656 "save settings to a settings-file." |
673 "save settings to a settings-file." |
657 |
674 |
658 "a temporary kludge for old classVariable-based settings |
675 "a temporary kludge for old classVariable-based settings |
659 - all of those MUST go into the user-preferences dictionary eventually" |
676 - all of those MUST go into the user-preferences dictionary eventually" |
5835 ! ! |
5852 ! ! |
5836 |
5853 |
5837 |
5854 |
5838 |
5855 |
5839 |
5856 |
|
5857 |
5840 !UserPreferences methodsFor:'default settings-syntax colors'! |
5858 !UserPreferences methodsFor:'default settings-syntax colors'! |
5841 |
5859 |
5842 listOfPredefinedSyntaxColoringSchemes |
5860 listOfPredefinedSyntaxColoringSchemes |
5843 "return a list of pre-defined syntax highlightning styles |
5861 "return a list of pre-defined syntax highlightning styles |
5844 (as shown in the Launchers 'source and debugger settings' dialog." |
5862 (as shown in the Launchers 'source and debugger settings' dialog." |
6143 self useNewSettingsApplication:aBoolean. |
6161 self useNewSettingsApplication:aBoolean. |
6144 ! ! |
6162 ! ! |
6145 |
6163 |
6146 !UserPreferences methodsFor:'saving'! |
6164 !UserPreferences methodsFor:'saving'! |
6147 |
6165 |
|
6166 save |
|
6167 self class saveSettings:self |
|
6168 |
|
6169 " |
|
6170 UserPreferences current save |
|
6171 " |
|
6172 |
|
6173 "Created: / 19-01-2019 / 14:06:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
6174 ! |
|
6175 |
6148 saveIn:fileName |
6176 saveIn:fileName |
6149 self class saveSettings:self in:fileName |
6177 self class saveSettings:self in:fileName |
6150 |
6178 |
6151 " |
6179 " |
6152 UserPreferences current saveIn:'test.settings' |
6180 UserPreferences current saveIn:'test.settings' |