[squeak-dev] The Trunk: MorphicExtras-HenrikSperreJohansen.100.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jun 21 20:38:51 UTC 2011


Chris Muller uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-HenrikSperreJohansen.100.mcz

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

Name: MorphicExtras-HenrikSperreJohansen.100
Author: HenrikSperreJohansen
Time: 21 January 2011, 8:12:44.296 pm
UUID: 4f7e3cb3-a980-dd4b-98e0-ec176e5d3736
Ancestors: MorphicExtras-nice.98

Update to use pragma-based sound preferences

=============== Diff against MorphicExtras-nice.98 ===============

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

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

Item was changed:
  ----- Method: TrashCanMorph>>mouseEnter: (in category 'event handling') -----
  mouseEnter: event 
  	"Present feedback for potential deletion."
  	| hand firstSub |
  	hand := event hand.
  	((hand submorphCount > 0
  				and: [(firstSub := hand submorphs first) ~~ self])
  			and: [self wantsDroppedMorph: firstSub event: event])
+ 		ifTrue: [SoundService soundEnabled
- 		ifTrue: [Preferences soundsEnabled
  				ifTrue: [self class playMouseEnterSound].
  			"hand visible: false." "This leads to confusion. Let morph and hand appear til dropped."
  			"self world abandonAllHalos."
  			"hand halo: nil."
  			self state: #pressed]
  		ifFalse: [self showStampIn: hand]!

Item was changed:
  ----- Method: TrashCanMorph>>mouseLeave: (in category 'event handling') -----
  mouseLeave: event
  	"Present feedback for aborted deletion."
  	| hand |
  	hand := event hand.
  	((hand submorphCount > 0) and:
  	 [hand submorphs first ~~ self])
  		ifTrue:
+ 			[SoundService soundEnabled ifTrue: [self class playMouseLeaveSound].
- 			[Preferences soundsEnabled ifTrue: [self class playMouseLeaveSound].
  			hand visible: true.
  			self state: #off]
  		ifFalse:
  			[self stopShowingStampIn: hand].
  !




More information about the Squeak-dev mailing list