<div dir="ltr"><div><div>Hi Tim,<br></div></div><div><br></div><div>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.<br></div><div><br></div><div><div>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.</div></div><div><br></div><div><div>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.</div><div></div></div><div></div><div><br></div><div>Best,</div><div>  Chris</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 24, 2019 at 1:56 PM <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">tim Rowledge uploaded a new version of PreferenceBrowser to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/PreferenceBrowser-tpr.98.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/PreferenceBrowser-tpr.98.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: PreferenceBrowser-tpr.98<br>
Author: tpr<br>
Time: 24 December 2019, 11:56:24.390074 am<br>
UUID: 686fff60-db2c-4f95-a3f4-486b0e3c68db<br>
Ancestors: PreferenceBrowser-mt.97<br>
<br>
Possible change to allow users to save preferences to other than the default directory and with names other than 'my.prefs'.<br>
<br>
=============== Diff against PreferenceBrowser-mt.97 ===============<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowser>>loadFromDiskSelected (in category 'preferences search') -----<br>
+ loadFromDiskSelected<br>
+ "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"<br>
+       (Project uiManager chooseFileMatching: '*.prefs' label: 'Select a preferences file to load')<br>
+               ifNotNil: [:fname | Cursor wait<br>
+                               showWhile: [[preferences loadPreferencesFrom: fname]<br>
+                                               on: Error<br>
+                                               do: [:ex | self inform: 'there was an error restoring the preferences from ' , fname]]] !<br>
- loadFromDiskSelected <br>
- <br>
-       (Project uiManager<br>
-               confirm: 'Do you really want to restore your\personal preferences from disk?\\The file ''my.prefs'' will be loaded.' translated withCRs<br>
-               title: 'Restore Preferences from Disk') ifFalse: [^ self].<br>
- <br>
-       preferences restorePreferencesFromDisk!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowser>>saveToDiskSelected (in category 'preferences search') -----<br>
+ saveToDiskSelected<br>
+       "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"<br>
+       (Project uiManager saveFilenameRequest: 'Save prefernces to file' initialAnswer: 'my.prefs')<br>
+               ifNotNil: [:fname | Cursor wait<br>
+                               showWhile: [[preferences storePreferencesIn: fname]<br>
+                                               on: Error<br>
+                                               do: [:ex | self inform: 'there was an error storing your preferences to disk']]]!<br>
- saveToDiskSelected <br>
- <br>
-       (Project uiManager<br>
-               confirm: 'Do you really want to overwrite your\personal preferences on disk?\\The file ''my.prefs'' will be updated.' translated withCRs<br>
-               title: 'Save Preferences to Disk') ifFalse: [^ self].<br>
-               <br>
-       preferences storePreferencesToDisk!<br>
<br>
<br>
</blockquote></div>