[squeak-dev] The Inbox: System-fbs.545.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jun 7 11:27:14 UTC 2013


A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-fbs.545.mcz

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

Name: System-fbs.545
Author: fbs
Time: 7 June 2013, 12:23:14.55 pm
UUID: a3af1619-45f5-4969-a7cc-f75033cca1b1
Ancestors: System-fbs.544

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 System-fbs.544 ===============

Item was changed:
  Object subclass: #Utilities
  	instanceVariableNames: ''
+ 	classVariableNames: 'AuthorInitials AuthorName CommonRequestStrings LastStats RecentSubmissions UpdateDownloader UpdateUrlLists'
- 	classVariableNames: 'AuthorInitials AuthorName CommonRequestStrings LastStats RecentSubmissions ScrapsBook UpdateDownloader UpdateUrlLists'
  	poolDictionaries: ''
  	category: 'System-Support'!
  
  !Utilities commentStamp: '<historical>' prior: 0!
  A repository for general and miscellaneous utilities; much of what is here are in effect global methods that don't naturally attach to anything else.  1/96 sw!

Item was removed:
- ----- Method: Utilities class>>addToTrash: (in category 'scraps') -----
- addToTrash: aMorph
- 	"Paste the object onto a page of the system Trash book, unless the preference is set to empty the trash immediately."
- 
- 	| aBook aPage |
- 	Preferences preserveTrash ifFalse: [^ self].
- 
- 	aBook := self scrapsBook.
- 	aMorph position: aBook pages first position + (0 at 40).
- 	aBook pages do: [:pp | 
- 		(pp submorphs size = 1 and: [pp hasProperty: #trash]) ifTrue:  "perhaps remove that property here"
- 			["page is blank"
- 			^ pp addMorph: aMorph]].
- 	aPage := aBook insertPageLabel: Time dateAndTimeNow printString
- 		morphs: (Array with: aMorph).
- 	aPage setProperty: #trash toValue: true!

Item was removed:
- ----- Method: Utilities class>>emptyScrapsBook (in category 'scraps') -----
- emptyScrapsBook
- 	"Utilities emptyScrapsBook"
- 	| oldScraps |
- 	oldScraps := ScrapsBook.
- 	ScrapsBook := nil.
- 	self scrapsBook.  "Creates it afresh"
- 	(oldScraps notNil and: [oldScraps owner notNil])
- 		ifTrue:
- 			[ScrapsBook position: oldScraps position.
- 			oldScraps owner replaceSubmorph: oldScraps by: ScrapsBook.
- 			ScrapsBook changed; layoutChanged]!

Item was changed:
  ----- Method: Utilities class>>initialize (in category 'class initialization') -----
  initialize
+ 	(self classVarNames includes: 'ScrapsBook') ifTrue: [self removeClassVarName: 'ScrapsBook'].
  	"Initialize the class variables.  5/16/96 sw"
  	self initializeCommonRequestStrings.
  	RecentSubmissions := OrderedCollection new.
  
+ 	self registerInFlapsRegistry.!
- 	self registerInFlapsRegistry.	!

Item was removed:
- ----- Method: Utilities class>>maybeEmptyTrash (in category 'scraps') -----
- maybeEmptyTrash
- 	(self confirm: 'Do you really want to empty the trash?' translated)
- 		ifTrue: [self emptyScrapsBook]!



More information about the Squeak-dev mailing list