nsSound::PlaySystemSound should use XkbBell



MailNews: Message Display
16 years ago
10 years ago


(Reporter: Ben Winslow, Unassigned)


(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)



(1 attachment)



16 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021205 Debian/1.2.1-2
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021205 Debian/1.2.1-1

XkbBell provides the closest implementation of system sounds on X11 (if Xkb is
pretent on the server.)  XkbBell() takes an atom as a sound name, and NewMail is
defined by Xkb (although you could theoretically use any atom name.)  I'm going
to attach a patch to generate a NewMail bell when that event happens in
MailNews, but in all other cases gdk_bell(); will still be used--someone may
wish to write a better implementation based on this, I just don't know enough
about Mozilla's internals to do so.

Reproducible: Always

Steps to Reproduce:
1. Use system new mail sound
2. Receive new mail.

Actual Results:  
Standard X bell beeps (gdk_beep() calls XBell())

Expected Results:  
Mozilla should use XkbBell() to create a more informative bell event.

When Mozilla uses the named bell, I can use xkbevd and create a
~/.xkb/xkbevd.cfg file like:
soundCmd = "aplay"
soundDirectory = "~/.xkb/sounds"
Sound(NewMail)                sound "newmail.wav"

to play a useful new mail sound (as opposed to 'beep' :)

I noticed bugs 180009 and 104174 are related, but I didn't feel that this
belonged under either of them.

Comment 1

16 years ago
Created attachment 108687 [details] [diff] [review]
Uses XkbBell for the new mail sound in the gtk, gtk2, and x11 widget toolkits.

I didn't get a chance to do a test compile for the gtk2 or x11 target, but I'm
reasonably certain they'll work (or only require very minor changes.)

Comment 2

16 years ago
Ack, sorry, that's 177280 and 104174, not 180009.

Comment 3

16 years ago
wow, I think we have a new contender for most amusingly mis-componentized bug
:-) I'm going to give this to Seth since he did the original sound stuff for new
Assignee: bienvenu → sspitzer
Component: Mail Database → Mail Window Front End
Ever confirmed: true

Comment 4

16 years ago
My first instinct was frontend, but one of the related bugs used mail database
(and I went along with it figuring that the new mail notification might be
triggered there.)  Anyway, you can give the award to sspitzer@netscape.com (Seth
Spitzer) (?) who appears to have created bug 104174 ;)

It's not really relevant, but if anyone wonders, the 1.2.1-2 on the UA is the
patched version I built for local use.

Comment 5

16 years ago
Geez, you're right - OK, Seth gets the prize :-) I'm sure that was an accident
on his part - I've changed the component on that bug. The mail database
component basically refers to .msf files, which was why it was funny to me :-)
QA Contact: gayatri → stephend
Product: Browser → Seamonkey


13 years ago
Assignee: sspitzer → mail
Is this bug still relevant? (No activity since Dec. 2002, no blockers)
QA Contact: stephend

Comment 7

10 years ago
Thunderbird still uses a traditional, unnamed bell for the new mail notification, so the idea is still relevant.  After almost 6 years, the patch probably isn't...
Assignee: mail → nobody
QA Contact: message-display


10 years ago
Blocks: 461963
You need to log in before you can comment on or make changes to this bug.