Closed Bug 1152926 Opened 6 years ago Closed 6 years ago

New mail sound preview doesn't work for default system sound on Mac OS X

Categories

(Thunderbird :: Preferences, defect)

x86
macOS
defect
Not set
normal

Tracking

(thunderbird38 fixed, thunderbird39 fixed, thunderbird40 fixed)

RESOLVED FIXED
Thunderbird 40.0
Tracking Status
thunderbird38 --- fixed
thunderbird39 --- fixed
thunderbird40 --- fixed

People

(Reporter: sshagarwal, Assigned: sshagarwal)

Details

Attachments

(1 file, 1 obsolete file)

No sound is heard when the new mail sound preview button is pressed for default system sound on Mac OS.

https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsISound#playSystemSound() suggests that playSystemSound isn't supported on Macintosh.
Attached patch Patch v1 (obsolete) — Splinter Review
The issue and the fix is similar to the one on bug 1141932 and bug 1144256.

Thanks.
Attachment #8590418 - Flags: review?(mconley)
Comment on attachment 8590418 [details] [diff] [review]
Patch v1

Review of attachment 8590418 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/components/preferences/general.js
@@ +115,5 @@
> +    if (!soundLocation.contains("file://")) {
> +      if (Services.appinfo.OS == "Darwin") // OS X
> +        sound.beep();
> +      else
> +        sound.playEventSound(Ci.nsISound.EVENT_NEW_MAIL_RECEIVED);

Are you sure Ci is defined here? The rest of the file uses Components.interfaces.
Attachment #8590418 - Flags: review?(mconley) → review-
Attached patch Patch v1.2Splinter Review
Oh sorry, missed that.
Attachment #8590418 - Attachment is obsolete: true
Attachment #8598617 - Flags: review?(aleth)
Comment on attachment 8598617 [details] [diff] [review]
Patch v1.2

Thanks!
Attachment #8598617 - Flags: review?(aleth) → review+
Keywords: checkin-needed
Attachment #8598617 - Flags: approval-comm-beta?
Attachment #8598617 - Flags: approval-comm-aurora?
Status: NEW → RESOLVED
Closed: 6 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 40.0
You need to log in before you can comment on or make changes to this bug.