A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-tpr.1131.mcz ==================== Summary ==================== Name: System-tpr.1131 Author: tpr Time: 30 December 2019, 5:24:21.566126 pm UUID: 8828c7c9-60f7-4eae-9881-50a29e2b2626 Ancestors: System-ct.1130 Clean up a couple of Preferences issues - delete a reference to the deprecated #thoroughSenders pref - de-duplicatise #restorePreferencesFromDisk - use translate friendly #format: for #restorePreferencesFromDisk: - update #storePreferencesIn: to use #allPreferneces so that deprecated prefs don't cause problem when saving preferences. =============== Diff against System-ct.1130 =============== Item was changed: ----- Method: Preferences class>>outOfTheBox (in category 'themes') ----- outOfTheBox "The default out-of-the-box preference settings for Squeak 3.2. The 'alternative' window-look and scrollbar-look are used. Button panes are used but not annotation panes. Scrollbars are on the right and do not flop out." self setPreferencesFrom: self defaultValueTableForCurrentRelease. + "SystemNavigation thoroughSenders: true. <- deprecated since all sender searching is now very thorough" - SystemNavigation thoroughSenders: true. SystemWindow clickOnLabelToEdit: true. Text ignoreStyleIfOnlyBold: true. MenuMorph roundedMenuCorners: true. ScrollBar scrollBarsWithoutMenuButton: true. SoundPlayer soundQuickStart: false. SoundPlayer stopSoundWhenDone: false. SoundService soundEnabled: true. SoundRecorder canRecordWhilePlaying:false.! Item was changed: ----- Method: Preferences class>>restorePreferencesFromDisk (in category 'initialization - save/load') ----- restorePreferencesFromDisk (FileDirectory default fileExists: 'my.prefs') ifTrue: [ Cursor wait showWhile: [ + self restorePreferencesFromDisk: 'my.prefs'] ] - [ self loadPreferencesFrom: 'my.prefs' ] on: Error do: [ :ex | self inform: 'there was an error restoring the preferences' ] - ] ] ifFalse: [ self inform: 'you haven''t saved your preferences yet!!' ]. ! Item was changed: ----- Method: Preferences class>>restorePreferencesFromDisk: (in category 'initialization - save/load') ----- + restorePreferencesFromDisk: fname - restorePreferencesFromDisk: aFile Cursor wait + showWhile: [[self loadPreferencesFrom: fname] - showWhile: [[self loadPreferencesFrom: aFile] on: Error + do: [:ex | ('There was an error restoring the preferences from file {1}.' translated format: {fname})]]! - do: [:ex | self inform: 'there was an error restoring the preferences' translated]]! Item was changed: ----- Method: Preferences class>>storePreferencesIn: (in category 'initialization - save/load') ----- storePreferencesIn: aFileName | stream prefsSnapshot | #(Prevailing PersonalPreferences) do: [:ea | Parameters removeKey: ea ifAbsent: []]. + [stream := ReferenceStream fileNamed: aFileName. - stream := ReferenceStream fileNamed: aFileName. stream nextPut: Parameters. + prefsSnapshot := IdentityDictionary new. + self allPreferences do:[ :prf| + prefsSnapshot at: prf name put: prf]. - prefsSnapshot := preferencesDictionary copy. - prefsSnapshot keysAndValuesDo: [:key :pref | prefsSnapshot at: key put: pref asPreference]. stream nextPut: prefsSnapshot. stream nextPut: (Smalltalk isMorphic ifTrue:[Project current world fillStyle] + ifFalse:[self desktopColor])] + ensure: [stream close]! - ifFalse:[self desktopColor]). - stream close! |
Free forum by Nabble | Edit this page |