Etoys Inbox: System-kfr.50.mcz

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

Etoys Inbox: System-kfr.50.mcz

commits-2
A new version of System was added to project Etoys Inbox:
http://source.squeak.org/etoysinbox/System-kfr.50.mcz

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

Name: System-kfr.50
Author: kfr
Time: 28 January 2012, 3:19:35 pm
UUID: 924c3a92-8441-454c-bf03-946e7a1adf0a
Ancestors: System-kfr.49

Add loading preferences file from disk to FileList and a file dialog when restoring preferences from disk in preference panel.

=============== Diff against System-Richo.48 ===============

Item was added:
+ ----- Method: Preferences class>>fileReaderServicesForFile:suffix: (in category 'services') -----
+ fileReaderServicesForFile: fullName suffix: suffix  
+
+ ^(self registeredPreferencesFileSuffixes includes: suffix )
+ ifTrue: [ self services ]
+ ifFalse: [ #() ]!

Item was added:
+ ----- Method: Preferences class>>registeredPreferencesFileSuffixes (in category 'services') -----
+ registeredPreferencesFileSuffixes
+ ^{'prefs'} !

Item was changed:
  ----- Method: Preferences class>>restorePreferencesFromDisk (in category 'personalization') -----
  restorePreferencesFromDisk
+ | result |
+ result := (FileList2 modalFileSelectorForSuffixes: #('prefs')) .
+ result ifNil: [^ self].
+ Cursor wait showWhile: [
+ [ self loadPreferencesFrom: result fullName ] on: Error do: [ :ex | self inform: 'there was an error restoring the preferences' translated]
+ ]
+
- (FileDirectory default fileExists: 'my.prefs')
- ifTrue: [ Cursor wait showWhile: [
- [ self loadPreferencesFrom: 'my.prefs' ] on: Error do: [ :ex | self inform: 'there was an error restoring the preferences' translated]
- ] ]
- ifFalse: [ self inform: 'you haven''t saved your preferences yet!!' translated].
  !

Item was added:
+ ----- Method: Preferences class>>restorePreferencesFromDisk: (in category 'personalization') -----
+ restorePreferencesFromDisk: aFile
+ Cursor wait showWhile: [
+ [ self loadPreferencesFrom: aFile ] on: Error do: [ :ex | self inform: 'there was an error restoring the preferences' translated]
+ ]
+
+ !

Item was added:
+ ----- Method: Preferences class>>serviceLoadPreferences (in category 'services') -----
+ serviceLoadPreferences
+ "Answer a service for loading preferences from disk"
+
+ ^ SimpleServiceEntry
+ provider: self
+ label: 'load preferences' translatedNoop
+ selector: #restorePreferencesFromDisk:
+ description: 'load preferences file from disk' translatedNoop
+ buttonLabel: 'load preferences' translatedNoop!

Item was added:
+ ----- Method: Preferences class>>services (in category 'services') -----
+ services  
+ "Answer the receiver's services"
+
+      ^ OrderedCollection with: self serviceLoadPreferences!

Item was removed:
- ----- Method: PseudoClass>>isMeta (in category 'testing') -----
- isMeta
- ^false!

Item was removed:
- ----- Method: PseudoMetaclass>>isMeta (in category 'testing') -----
- isMeta
- ^true!

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev