Bug 1152926 - New mail sound preview doesn't work for default system sound on Mac OS X. r=aleth

This commit is contained in:
Suyash Agarwal 2015-04-28 06:19:00 +02:00
Родитель ecf2da3e06
Коммит 7a3ca3a235
1 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -110,12 +110,16 @@ var gGeneralPane = {
var soundLocation; var soundLocation;
soundLocation = document.getElementById('soundType').value == 1 ? soundLocation = document.getElementById('soundType').value == 1 ?
document.getElementById('soundUrlLocation').value : "_moz_mailbeep" document.getElementById('soundUrlLocation').value : "";
if (!soundLocation.contains("file://")) if (!soundLocation.contains("file://")) {
sound.playSystemSound(soundLocation); if (Services.appinfo.OS == "Darwin") // OS X
else sound.beep();
else
sound.playEventSound(Components.interfaces.nsISound.EVENT_NEW_MAIL_RECEIVED);
} else {
sound.play(Services.io.newURI(soundLocation, null, null)); sound.play(Services.io.newURI(soundLocation, null, null));
}
}, },
browseForSoundFile: function () browseForSoundFile: function ()