The Trunk: MorphicExtras-fbs.127.mcz

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

The Trunk: MorphicExtras-fbs.127.mcz

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

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

Name: MorphicExtras-fbs.127
Author: fbs
Time: 25 November 2013, 8:59:19.085 am
UUID: ed3dd937-6878-fd43-8270-67c3042edd6a
Ancestors: MorphicExtras-nice.126

Deprecate the old scrapsbook API: use ScrapBook instead of Utilities.

=============== Diff against MorphicExtras-nice.126 ===============

Item was changed:
  ----- Method: ScrapBook>>scrapBook (in category 'scraps') -----
  scrapBook
  | header aButton label |
  ^ book ifNil: [
  book := BookMorph new pageSize: 200@300; setNameTo: 'scraps' translated.
  book color: Color yellow muchLighter.
  book borderColor: Color darkGray; borderWidth: 2.
  book 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: book;
  color:  Color tan;
  actionSelector: #delete;
  setBalloonText: 'Close the trashcan.\(to view again later, click on any trashcan).' withCRs 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: self; color:  Color veryLightGray; actionSelector: #maybeEmptyTrash;
- aButton target: Utilities; color:  Color veryLightGray; actionSelector: #maybeEmptyTrash;
  setBalloonText: 'Click here to empty the trash.' translated.
  book 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.' withCRs translated
  wrappedTo: 190).
 
  book addMorphFront: header.
  book setProperty: #scraps toValue: true].!

Item was changed:
  ----- Method: TrashCanMorph class>>moveToTrash: (in category 'miscellaneous') -----
  moveToTrash: aMorph
  SoundService soundEnabled ifTrue:
  [Preferences preserveTrash
  ifFalse:
  [self playSoundNamed: 'scratch']
  ifTrue:
  [self playDeleteSound]].
 
  aMorph delete.
+ aMorph == ScrapBook default scrapBook ifFalse:
+ [ScrapBook default addToTrash: aMorph]!
- aMorph == Utilities scrapsBook ifFalse:
- [Utilities addToTrash: aMorph]!

Item was changed:
  ----- Method: TrashCanMorph>>acceptDroppingMorph:event: (in category 'layout') -----
  acceptDroppingMorph: aMorph event: evt
  SoundService soundEnabled
  ifTrue: [Preferences preserveTrash
  ifTrue: [self class playDeleteSound]
  ifFalse: [self playSoundNamed: 'scratch']].
  evt hand visible: true.
  self state: #off.
  aMorph delete.
+ aMorph == ScrapBook default scrapBook
+ ifFalse: [ScrapBook default addToTrash: aMorph removeHalo]!
- aMorph == Utilities scrapsBook
- ifFalse: [Utilities addToTrash: aMorph removeHalo]!

Item was changed:
  ----- Method: TrashCanMorph>>wantsDroppedMorph:event: (in category 'dropping/grabbing') -----
  wantsDroppedMorph: aMorph event: evt
 
+ ^ ((aMorph ~~ self) and: [aMorph ~~ ScrapBook default scrapBook]) and:
- ^ ((aMorph ~~ self) and: [aMorph ~~ Utilities scrapsBook]) and:
  [aMorph willingToBeDiscarded]!

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

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

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

Item was removed:
- ----- Method: Utilities class>>scrapsBook (in category '*MorphicExtras-scraps') -----
- scrapsBook
- ^ ScrapBook default scrapBook!