[squeak-dev] The Inbox: PreferenceBrowser-tpr.98.mcz

Chris Muller asqueaker at gmail.com
Thu Dec 26 23:58:28 UTC 2019


Hi Tim,

Why?  Preferences are specific to users.  An individual user concerned
enough to want their own preferences is going to want their own directory
to work out of.

As with the new Image "Save as...", on machines with magnetic HD's and lots
of directories, having to scan the directory just to present this unwanted
UI immensely slows down and complicates the normal use-case for that.  Even
more frustrating is that it encourages a bad habits, manual configuration.

Please add a new button to render and "Select..." your desired preference
file instead.  That way, the existing buttons can maintain the quick-access
we've enjoyed all these years.

Best,
  Chris

On Tue, Dec 24, 2019 at 1:56 PM <commits at source.squeak.org> wrote:

> tim Rowledge uploaded a new version of PreferenceBrowser to project The
> Inbox:
> http://source.squeak.org/inbox/PreferenceBrowser-tpr.98.mcz
>
> ==================== Summary ====================
>
> Name: PreferenceBrowser-tpr.98
> Author: tpr
> Time: 24 December 2019, 11:56:24.390074 am
> UUID: 686fff60-db2c-4f95-a3f4-486b0e3c68db
> Ancestors: PreferenceBrowser-mt.97
>
> Possible change to allow users to save preferences to other than the
> default directory and with names other than 'my.prefs'.
>
> =============== Diff against PreferenceBrowser-mt.97 ===============
>
> Item was changed:
>   ----- Method: PreferenceBrowser>>loadFromDiskSelected (in category
> 'preferences search') -----
> + loadFromDiskSelected
> + "Ask the user to select a saved preference file to load. If none is
> chosen then do nothing. If there is an error during the loading inform the
> user; this may leave the preferences in a messy state as we aren't tracking
> where the erro ocurred"
> +       (Project uiManager chooseFileMatching: '*.prefs' label: 'Select a
> preferences file to load')
> +               ifNotNil: [:fname | Cursor wait
> +                               showWhile: [[preferences
> loadPreferencesFrom: fname]
> +                                               on: Error
> +                                               do: [:ex | self inform:
> 'there was an error restoring the preferences from ' , fname]]] !
> - loadFromDiskSelected
> -
> -       (Project uiManager
> -               confirm: 'Do you really want to restore your\personal
> preferences from disk?\\The file ''my.prefs'' will be loaded.' translated
> withCRs
> -               title: 'Restore Preferences from Disk') ifFalse: [^ self].
> -
> -       preferences restorePreferencesFromDisk!
>
> Item was changed:
>   ----- Method: PreferenceBrowser>>saveToDiskSelected (in category
> 'preferences search') -----
> + saveToDiskSelected
> +       "save the current preferences settings to file; the default is
> 'my.prefs' in the current default directory. Allow the user to choose where
> they should go"
> +       (Project uiManager saveFilenameRequest: 'Save prefernces to file'
> initialAnswer: 'my.prefs')
> +               ifNotNil: [:fname | Cursor wait
> +                               showWhile: [[preferences
> storePreferencesIn: fname]
> +                                               on: Error
> +                                               do: [:ex | self inform:
> 'there was an error storing your preferences to disk']]]!
> - saveToDiskSelected
> -
> -       (Project uiManager
> -               confirm: 'Do you really want to overwrite your\personal
> preferences on disk?\\The file ''my.prefs'' will be updated.' translated
> withCRs
> -               title: 'Save Preferences to Disk') ifFalse: [^ self].
> -
> -       preferences storePreferencesToDisk!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191226/00317134/attachment.html>


More information about the Squeak-dev mailing list