Closed Bug 778114 Opened 12 years ago Closed 12 years ago

chat sound not playing if mail notification sound disabled

Categories

(Thunderbird :: Instant Messaging, defect)

15 Branch
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 17.0

People

(Reporter: realRaven, Assigned: realRaven)

Details

Attachments

(1 file, 4 obsolete files)

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1
Build ID: 20120713134347

Steps to reproduce:

enabled mail.chat.play_notification_sound while having mail.biff.play_sound disabled


Actual results:

no notification sounds played back when my name was mentioned in IRC


Expected results:

chat notification sounds should play even if mail notification sounds are disabled
Severity: normal → trivial
Component: General → Instant Messaging
Tech Notes for patching:

Pref check within PlayBiffSound() needs to move outside and be checked before calling PlayBiffSound() instead; code:

http://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsStatusBarBiffManager.cpp#229 


http://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsStatusBarBiffManager.cpp#89

http://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsStatusBarBiffManager.cpp#180

I will see if I can get around to writing that one soon...
Assignee: nobody → axelg
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Windows XP → All
Hardware: x86 → All
Attachment #646910 - Attachment is obsolete: true
Attachment #646913 - Flags: review?
removed duplicate comment
Attachment #646913 - Attachment is obsolete: true
Attachment #646913 - Flags: review?
Attachment #646915 - Flags: review?(irving)
Attached patch This one even compiles :P (obsolete) — Splinter Review
Ok, it was pointed out that previous code was incomplete, and how to compile a single file. This one compiles and should also work as designed. I have yet to make a full build for testing.
Attachment #646915 - Attachment is obsolete: true
Attachment #646915 - Flags: review?(irving)
Attached patch moved a commentSplinter Review
moved a comment to a more appropriate place
Attachment #646921 - Attachment is obsolete: true
Axel, is it intentional that there's no review request on the patch attached in comment 6?
probably not, who should I add for this one?
Attachment #646925 - Flags: review?(irving)
Comment on attachment 646925 [details] [diff] [review]
moved a comment

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

Looks fine, works in my quick test.

::: mailnews/base/src/nsStatusBarBiffManager.cpp
@@ +170,5 @@
>      // if we fail along the way, don't return.
>      // we still need to update the UI.    
>      if (newValue == nsIMsgFolder::nsMsgBiffState_NewMail) {
> +      nsresult rv;
> +      nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));

This retrieves the pref service twice per notification (once here, and once inside the call to PlayBiffSound()) but I can't see a simple way to only get it once, and it's not a huge performance hit anyway.
Attachment #646925 - Flags: review?(irving) → review+
Pushed to comm-central trunk:

https://hg.mozilla.org/comm-central/rev/6bbaa1a0d296
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Thanks Florian for taking this over. My build system defunct for the last fortnight :(
Target Milestone: --- → Thunderbird 17.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: