It would be cool to store the personal preferences in a method like ReleaseBuilder>>setPreferences so we could version it with Monticello.

We could have a class like PersonalPreferences.
All I had to do to sync preferences to different computers would be to load PersonalPreferences-kfr.1.mcz

Best,
Karl


On Thu, Aug 17, 2023 at 11:31 PM Tim Rowledge <tim@rowledge.org> wrote:


> On 2023-08-17, at 11:15 AM, Jakob Reschke <jakres+squeak@gmail.com> wrote:
>
>
> Tim Rowledge <tim@rowledge.org> schrieb am Do., 17. Aug. 2023, 19:19:
>
> We don't actually have any easy way of listing preferences we've changed, do we?
>
> At least none known to me. If the export files happen to be text, I guess one could have diffed them. But I compared checkboxes between a fresh image and a working image...

We really should do better than that.

A trivial doit to read a prefs file -
|fName stream |
fName := '/home/pi/Documents/Squeak/my.prefs'.
stream := ReferenceStream fileNamed: fName.
params := stream next.
dict := stream next.
stream close.
{params. dict}

The content is a bit baroque. What exactly is PersonalDictionaryOfPreferences and why is it ignored when loading prefs? Since it is removed on load, how come my prefs file even has such an entry? (OK, looks likely that my prefs file is so old it predates that being removed?)

We have a dictionary of 'parameters' that is a list of named objects that are used as preferred things - fonts, mostly. Then a dictionary of actual preference objects.  It almost seems as if a project wasn't actually completed to make Preferences for everything?

This all seems a bit broken to me so perhaps I'm missing something here. If one sets some preferences and uses the plain 'save', those choices (actually the entire set of items in the preferencesDictionary, so not the font etc choices) are copied to the PersonalDictionaryOfPreferences in the parameters dictionary. You can then use the 'default' button, or make more choices and then 'load' to return to your previous set. *However* if you 'save to disk' - which seems like a pretty sensible thing to do - then loading that file will *not* include your personal choices set.

Pretty sure there are more helpful possibilities.

tim
--
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim
Useful Latin Phrases:- Non curo. Si metrum non habet, non est poema = I don't care. If it doesn't rhyme, it isn't a poem.