[Squeakland] silence trashcan?

Karl karl.ramberg at comhem.se
Wed Dec 12 09:35:10 PST 2007

Mark Nelson wrote:
> How do I silence the 'camera' sound when items go to the trash bin, =

> while keeping the 'preserve trash' functionality? I thought I had this =

> solved when I found the "TrashCanMorph >> playDeleteSound" message, =

> but this is a 'ping' sound that plays simultaneously along with the =

> 'camera' sound. I successfullly eliminated the 'ping' by commenting it =

> out in "TrashCanMorph >> moveToTrash" but I haven't been able to =

> figure out who's responsible for generating the 'camera' sound. =

> Thanks,
> --Mark
Funny coincidence, I fixed this for OLPC image yesterday.
Try filing in attached change set.
You have to empty the current thrash and close it, then the new instance =

will not make camera sound.

-------------- next part --------------
'From Squeakland 3.8-05 of 7 September 2005 [latest update: #552] on 12 Dec=
ember 2007 at 6:32:24 pm'!

!Utilities class methodsFor: 'scraps' stamp: 'kfr 12/12/2007 18:29'!
	| header aButton label |
	ScrapsBook ifNil:
		[ScrapsBook _ BookMorph new pageSize: 200 at 300; setNameTo: 'scraps' transl=
		ScrapsBook color: Color yellow muchLighter.
		ScrapsBook borderColor: Color darkGray; borderWidth: 2.
		ScrapsBook setProperty:#transitionSpec toValue: (Array with: 'silence'  w=
ith: #none with: #none).
		ScrapsBook removeEverything; showPageControls; insertPage.
		header _ AlignmentMorph newRow wrapCentering: #center; cellPositioning: #=
		header setProperty: #header toValue: true.
		header addMorph: (aButton _ SimpleButtonMorph new label: 'O' font: Prefer=
ences 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) beSt=
		label getSelector: #trashTitle; useStringFormat; step.
		header addMorphBack: AlignmentMorph newVariableTransparentSpacer beSticky.
		header addMorphBack: (aButton _ SimpleButtonMorph new label: 'E' translat=
ed font: Preferences standardButtonFont).
		aButton target: Utilities; color:  Color veryLightGray; actionSelector: #=
				setBalloonText: 'Click here to empty the trash.' translated.
		ScrapsBook currentPage addMorph: (TextMorph new contents: 'Objects you dr=
ag 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 Squeakland mailing list