[squeak-dev] The Trunk: MorphicExtras-fbs.110.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jun 13 20:31:28 UTC 2013


Frank Shearar uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-fbs.110.mcz

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

Name: MorphicExtras-fbs.110
Author: fbs
Time: 13 June 2013, 9:31:11.921 pm
UUID: 463c8474-8168-4460-8660-e09f41612ef9
Ancestors: MorphicExtras-fbs.109

Another step in breaking the System->MorphicExtras dependency: pull the ScrapsBook class variable out and store the global state in a new ScrapBook class.

=============== Diff against MorphicExtras-fbs.109 ===============

Item was added:
+ ----- Method: Utilities class>>addToTrash: (in category '*MorphicExtras-scraps') -----
+ addToTrash: aMorph
+ 	ScrapBook default addToTrash: aMorph.!

Item was added:
+ ----- Method: Utilities class>>emptyScrapsBook (in category '*MorphicExtras-scraps') -----
+ emptyScrapsBook
+ 	ScrapBook default emptyScrapBook!

Item was added:
+ ----- Method: Utilities class>>maybeEmptyTrash (in category '*MorphicExtras-scraps') -----
+ maybeEmptyTrash
+ 	ScrapBook default maybeEmptyTrash.!

Item was changed:
+ ----- Method: Utilities class>>scrapsBook (in category '*MorphicExtras-scraps') -----
- ----- Method: Utilities class>>scrapsBook (in category '*MorphicExtras') -----
  scrapsBook
+ 	^ ScrapBook default scrapBook!
- 	| header aButton label |
- 	ScrapsBook ifNil:
- 		[ScrapsBook := BookMorph new pageSize: 200 at 300; setNameTo: 'scraps' translated.
- 		ScrapsBook color: Color yellow muchLighter.
- 		ScrapsBook borderColor: Color darkGray; borderWidth: 2.
- 		ScrapsBook removeEverything; showPageControls; insertPage.
- 		header := AlignmentMorph newRow wrapCentering: #center; cellPositioning: #leftCenter.
- 		header setProperty: #header toValue: true.
- 		header addMorph: (aButton := SimpleButtonMorph new label: 'O' font: Preferences standardButtonFont).
- 		aButton target: ScrapsBook; color:  Color tan; actionSelector: #delete;
- 				setBalloonText: 'Close the trashcan.
- (to view again later, click on any trashcan).' translated.
- 
- 		header addMorphBack: AlignmentMorph newVariableTransparentSpacer beSticky.
- 		header addMorphBack: 	(label := UpdatingStringMorph new target: self) beSticky.
- 		label getSelector: #trashTitle; useStringFormat; step.
- 		header addMorphBack: AlignmentMorph newVariableTransparentSpacer beSticky.
- 		header addMorphBack: (aButton := SimpleButtonMorph new label: 'E' translated font: Preferences standardButtonFont).
- 		aButton target: Utilities; color:  Color veryLightGray; actionSelector: #maybeEmptyTrash;
- 				setBalloonText: 'Click here to empty the trash.' translated.
- 		ScrapsBook currentPage addMorph: (TextMorph new contents: 'Objects you drag into the trash will automatically be saved here, one object per page, in case you need them later.  To disable this feature set the "preserveTrash" Preference to false.
- 
- You can individually expunge objects by hitting the - control, and you can empty out all the objects in the trash can by hitting the "E" button at top right.' translated
- 			wrappedTo: 190).
- 
- 		ScrapsBook addMorphFront: header.
- 		ScrapsBook setProperty: #scraps toValue: true].
- 	^ ScrapsBook
- 
- 	"Utilities emptyScrapsBook"
- !



More information about the Squeak-dev mailing list