[etoys-dev] Etoys: System-bf.41.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Sep 16 18:31:44 EDT 2010
Bert Freudenberg uploaded a new version of System to project Etoys:
http://source.squeak.org/etoys/System-bf.41.mcz
==================== Summary ====================
Name: System-bf.41
Author: bf
Time: 17 September 2010, 12:30:51 am
UUID: c3f00945-7fb2-458a-bd5f-2e26e8e8984b
Ancestors: System-bf.40
Add button to reset saved preferences.
=============== Diff against System-bf.40 ===============
Item was changed:
----- Method: BooleanPreferenceView>>offerPersistenceMenu (in category 'user interface') -----
offerPersistenceMenu
| aMenu |
+ Preferences ensurePersistedPreferencesAccessible
+ ifFalse: [^self].
- Preferences persistedPreferencesAccessible
- ifFalse: [^self inform: ('{1} is in secure mode.
- You cannot access the persistent preferences now.
- To change them, start {1} without loading a project.' translated
- format: {SystemVersion current baseName capitalized})].
-
aMenu := MenuMorph new defaultTarget: self preference.
aMenu addTitle: self preference name.
aMenu addUpdating: #isEnabledOnStartupString target: self preference selector: #persistValue: argumentList: {true}.
aMenu addUpdating: #isDisabledOnStartupString target: self preference selector: #persistValue: argumentList: {false}.
aMenu addUpdating: #isNotSetOnStartupString target: self preference selector: #persistValue: argumentList: {nil}.
aMenu popUpInWorld!
Item was added:
+ ----- Method: Preferences class>>deletePersistedPreferences (in category 'persistence') -----
+ deletePersistedPreferences
+ | d files |
+ self ensurePersistedPreferencesAccessible
+ ifFalse: [^self].
+ d := ExternalSettings preferenceDirectory.
+ files := d fileNamesMatching: '*', self persistedFileNameExtension.
+ (self confirm: ('This will remove {1} stored preferences.
+ Are you sure?' translated format: {files size}))
+ ifTrue: [files do: [:f | d deleteFileNamed: f]].!
Item was added:
+ ----- Method: Preferences class>>ensurePersistedPreferencesAccessible (in category 'persistence') -----
+ ensurePersistedPreferencesAccessible
+ self persistedPreferencesAccessible
+ ifTrue: [^true].
+ self inform: ('{1} is in secure mode.
+ You cannot access the persistent preferences now.
+ To change them, start {1} without loading a project.' translated
+ format: {SystemVersion current baseName capitalized}).
+ ^false!
Item was changed:
----- Method: PreferencesPanel>>addHelpItemsTo: (in category 'find') -----
addHelpItemsTo: panelPage
"Add the items appropriate the the ? page of the receiver"
| aButton aTextMorph aMorph firstTextMorph |
panelPage hResizing: #shrinkWrap; vResizing: #shrinkWrap.
firstTextMorph _ TextMorph new contents: 'Search Preferences for:' translated.
"firstTextMorph beAllFont: ((TextStyle default fontOfSize: 13) emphasized: 1)."
panelPage addMorphBack: firstTextMorph lock.
panelPage addTransparentSpacerOfSize: 0 at 10.
aMorph _ RectangleMorph new clipSubmorphs: true; beTransparent; borderWidth: 2; borderColor: Color black; extent: 250 @ 36.
aMorph vResizing: #rigid; hResizing: #rigid.
aTextMorph _ PluggableTextMorph new
on: self
text: #searchString
accept: #setSearchStringTo:
readSelection: nil
menu: nil.
" aTextMorph hResizing: #rigid."
aTextMorph borderWidth: 0.
aTextMorph font: ((TextStyle default fontOfSize: 21) emphasized: 1); setTextColor: Color red.
aMorph addMorphBack: aTextMorph.
aTextMorph acceptOnCR: true.
aTextMorph position: (aTextMorph position + (6 at 5)).
aMorph clipLayoutCells: true.
aTextMorph extent: 240 @ 25.
panelPage addMorphBack: aMorph.
aTextMorph setBalloonText: 'Type what you want to search for here, then hit the "Search" button, or else hit RETURN or ENTER' translated.
aTextMorph setTextMorphToSelectAllOnMouseEnter.
aTextMorph hideScrollBarsIndefinitely.
panelPage addTransparentSpacerOfSize: 0 at 10.
aButton _ SimpleButtonMorph new
target: self;
color: Color transparent;
actionSelector: #initiateSearch:;
arguments: {aTextMorph};
label: 'Search' translated.
panelPage addMorphBack: aButton.
aButton setBalloonText: 'Type what you want to search for in the box above, then click here (or hit RETURN or ENTER) to start the search; results will appear in the "search results" category.' translated.
panelPage addTransparentSpacerOfSize: 0 at 30.
+ panelPage addMorphBack: (SimpleButtonMorph new
+ color: Color transparent;
+ label: 'Reset preferences on startup' translated;
+ target: Preferences;
+ actionSelector: #deletePersistedPreferences;
+ setBalloonText: 'Click here to delete all the preferences saved on file. On the next start, they will have their original value.' translated ; yourself).
+
+ panelPage addTransparentSpacerOfSize: 0 at 14.
+
Preferences eToyFriendly ifFalse: [
panelPage addMorphBack: (SimpleButtonMorph new
color: Color transparent;
label: 'Restore all Default Preference Settings' translated;
target: Preferences;
actionSelector: #chooseInitialSettings;
setBalloonText: 'Click here to reset all the preferences to their standard default values.' translated ; yourself).
panelPage addTransparentSpacerOfSize: 0 at 14.
panelPage addMorphBack: (SimpleButtonMorph new
color: Color transparent;
label: 'Save Current Settings as my Personal Preferences' translated;
target: Preferences;
actionSelector: #savePersonalPreferences;
setBalloonText: 'Click here to save the current constellation of Preferences settings as your personal defaults; you can get them all reinstalled with a single gesture by clicking the "Restore my Personal Preferences".' translated; yourself).
panelPage addTransparentSpacerOfSize: 0 at 14.
panelPage addMorphBack: (SimpleButtonMorph new
color: Color transparent;
label: 'Restore my Personal Preferences' translated;
target: Preferences;
actionSelector: #restorePersonalPreferences;
setBalloonText: 'Click here to reset all the preferences to their values in your Personal Preferences.' translated; yourself).
panelPage addTransparentSpacerOfSize: 0 at 30.
panelPage addMorphBack: (SimpleButtonMorph new
color: Color transparent;
label: 'Save Current Settings to Disk' translated;
target: Preferences;
actionSelector: #storePreferencesToDisk;
setBalloonText: 'Click here to save the current constellation of Preferences settings to a file; you can get them all reinstalled with a single gesture by clicking "Restore Settings From Disk".' translated; yourself).
panelPage addTransparentSpacerOfSize: 0 at 14.
panelPage addMorphBack: (SimpleButtonMorph new
color: Color transparent;
label: 'Restore Settings from Disk' translated;
target: Preferences;
actionSelector: #restorePreferencesFromDisk;
setBalloonText: 'Click here to load all the preferences from their saved values on disk.' translated; yourself).
panelPage addTransparentSpacerOfSize: 0 at 30.
panelPage addMorphBack: (SimpleButtonMorph new
color: Color transparent;
label: 'Inspect Parameters' translated;
target: Preferences;
actionSelector: #inspectParameters;
setBalloonText: 'Click here to view all the values stored in the system Parameters dictionary' translated; yourself).
panelPage addTransparentSpacerOfSize: 0 at 10.
panelPage addMorphBack: (Preferences themeChoiceButtonOfColor: Color transparent font: TextStyle defaultFont).
panelPage addTransparentSpacerOfSize: 0 at 10.
].
panelPage addMorphBack: (SimpleButtonMorph new
color: Color transparent;
label: 'Help!!' translated;
target: Preferences;
actionSelector: #giveHelpWithPreferences;
setBalloonText: 'Click here to get some hints on use of this Preferences Panel' translated; yourself).
panelPage wrapCentering: #center.
!
More information about the etoys-dev
mailing list