[squeak-dev] The Trunk: Sound-mt.89.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Apr 20 09:39:40 UTC 2022
Marcel Taeumel uploaded a new version of Sound to project The Trunk:
http://source.squeak.org/trunk/Sound-mt.89.mcz
==================== Summary ====================
Name: Sound-mt.89
Author: mt
Time: 20 April 2022, 11:39:39.081902 am
UUID: 9ae530a1-a45a-974e-8cde-2fabc26a4be7
Ancestors: Sound-ct.88
Complements ToolBuilder-Kernel-mt.158
=============== Diff against Sound-ct.88 ===============
Item was changed:
----- Method: AbstractSound class>>storeFiledInSound:named: (in category 'sound library-file in/out') -----
storeFiledInSound: snd named: sndName
"Store the given sound in the sound library. Use the given name if it isn't in use, otherwise ask the user what to do."
| choice i |
(Sounds includesKey: sndName) ifFalse: [ "no name clash"
Sounds at: sndName put: snd.
^ self].
(Sounds at: sndName) == UnloadedSnd ifTrue: [
"re-loading a sound that was unloaded to save space"
Sounds at: sndName put: snd.
^ self].
"the given sound name is already used"
+ choice := Project uiManager
+ chooseOptionFrom: #('replace the existing sound' 'rename the new sound' 'skip it')
- choice := UIManager default
- chooseFrom: #('replace the existing sound' 'rename the new sound' 'skip it')
values: #('replace the existing sound' 'rename the new sound' 'skip it')
title: '"', sndName, '" has the same name as an existing sound'.
(choice beginsWith: 'replace') ifTrue: [
Sounds at: sndName put: snd.
^ self].
(choice beginsWith: 'rename') ifTrue: [
i := 2.
[Sounds includesKey: (sndName, ' v', i printString)] whileTrue: [i := i + 1].
Sounds at: (sndName, ' v', i printString) put: snd].
!
More information about the Squeak-dev
mailing list
|