The Inbox: PreferenceBrowser-tpr.100.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: PreferenceBrowser-tpr.100.mcz

commits-2
A new version of PreferenceBrowser was added to project The Inbox:
http://source.squeak.org/inbox/PreferenceBrowser-tpr.100.mcz

==================== Summary ====================

Name: PreferenceBrowser-tpr.100
Author: tpr
Time: 30 December 2019, 5:26:31.966612 pm
UUID: a61c6355-50a3-43c4-9696-b769e77846e0
Ancestors: PreferenceBrowser-tpr.99

de-duplicatise #loadFromDiskSelected and use #restorePreferencesFromDisk: properly

=============== Diff against PreferenceBrowser-tpr.99 ===============

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' translated)
+ ifNotNil: [:fname | preferences restorePreferencesFromDisk: fname] !
- ifNotNil: [:fname | Cursor wait
- showWhile: [[preferences loadPreferencesFrom: fname]
- on: Error
- do: [:ex | self inform: ('There was an error restoring the preferences from file {1}.' translated format: {fname})]]] !