Closed Bug 64462 Opened 24 years ago Closed 22 years ago

Play custom sound when new mail arrives (implement hidden prefs and design UI)

Categories

(SeaMonkey :: MailNews: Message Display, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.2beta

People

(Reporter: sspitzer, Assigned: sspitzer)

References

Details

(Keywords: helpwanted)

Attachments

(3 files, 14 obsolete files)

(deleted), image/gif
Details
(deleted), patch
Details | Diff | Splinter Review
(deleted), patch
Details | Diff | Splinter Review
I assigning this to you ryan, I hope that is ok. we've got three prefs: "mail.biff.play_sound" "mail.biff.use_default_sound" "mail.biff.sound_file" only the first is currently reflected in the ui. let me attach a screen shot of what ryan is working on in his tree.
sfraser and mpt suggest that we use the system sound for new mail, instead of allowing the user to pick there own within our application. I'm starting to lean that way for win32 and mac. But UNIX doesn't have something like that. ryan, keep going with your UI work. it might turn out to only be used on platforms that don't have system sounds.
Attached image screen shot of the ui ryan is working on (obsolete) (deleted) —
> But UNIX doesn't have something like that. GNOME does have OS-wide sound prefs. See Control Panel (I have a localized version, so no screenshots). I don't see an OS-wide entry for "new mail", but these are under the apps, e.g. PopApp* -> New Mail. *a biff
Since several sounds are likely to be kept in the same directory, perhaps the UI could look like this: [/] Play _sound when a message arrives: [ trumpet :^] ( _Other ... ) The popup menu would list all sound files (with suffixes removed) which were present in the same directory as the currently selected sound. The `Other ...' button would allow selection of a sound file in a different directory. _______________ | antelope | | crash | | glass | [/] Play _sound when a message arrives: |* trumpet | ( _Other ... ) |::xylophone:,::| | yawn |\ | """""""""""""\" This would also allow for easier previewing of the sound: instead of having to open and close the filepicker in order for Mozilla to play the sound, you could just re-select it in the popup menu.
Keywords: helpwanted
Hardware: PC → All
We already have completion devices. Windows makes location bars completion devices, so we could have: [/] Play _sound when a message arrives <preview> [ drive/path/file.wav ] <browse> Thee user can then remove file.wav and receive a completion list. OTOH. everyone else is leaning towards os support. Windows has a sounds control panel, and any app can register sounds that can be configured with it. Since MacOS and gnome have that (i hope gnome has it as part of gtk and not part of gnome) then this probably makes the most sense.
> i hope gnome has it as part of gtk and not part of gnome It's *GNOME*, not GTK.
then that won't do, since we require gtk but we should not require gnome.
Sure we shouldn't require GNOME, but we have no obligation to support each feature everywhere. IMO, pointing these users to prefs.js is ok. BTW: KDE might have similar prefs.
Eventually we can put the stuff which the platform already has a GUI for into a general `MozConfig' utility, which reads/writes the platform's Internet settings on Mac/Windows/GNOME/KDE (where such settings exist). But for now duplication of the platform settings is ok. Meanwhile, for accessibility reasons, we need to provide for more than just sound ... +-When new mail arrives:-----------------------------+ | [/] Flash icon | <-- not on Linux/Unix yet | [ ] Display alert | | [/] Play _sound: [ trumpet :^] ( _Other ... ) | +----------------------------------------------------+
I don't like the idea of the user having to choose sound files on disk. Mac users won't have a clue about where to find sound files that they can play, and probably won't have any anyway. Also, what formats would we support? AIFF? WAV? etc etc. If you are going to offer a choice of sounds, throw some WAV files into a jar file, and give the user a popup menu to choose from the available ones, like AIM does.
Formats available for playing is covered by bug 11972. Filed bug 65053 about allowing Mac users to use any of the sounds from the System file (Sosumi, Purr, Indigo, Temple, et al).
adding dependency. ryan, feel free to give this bug back to gayatrib or me until we finish figuring out what we are going to do.
Blocks: 65053
maybe a radio button to select: <> use sound defined by operating system (default) <> select sound: <curren dir :^> <Browse...> <Preview Sound> So the whole thing could look like (apologies for the plagiarism): +- When new mail arrives: --------------------------------------------+ | [x] Flash icon in Toolbar | | <> Load at startup of Operating System (default) | | <> Load only when Mozilla is running | | [ ] Display alert Window | | [x] Play _sound: | | <> use sound defined by operating system (default) | | <> select sound: <current dir :^> <Browse...> <Preview Sound>| +---------------------------------------------------------------------+ Of course the play sound option (and selecting a sound) could be implemented first to get this thing going. The others could be put into prefs and greyed out until implemented. The flashing icon could be a separate app that could be loaded at startup (very cool since mozilla wouldn't have to be running all the time).
Ryan, to play the default alert sound on mac, just do: SysBeep(30); and be sure to include the <sound.h> header from the mac toolbox. Also, what is the progress here? How long 'til we will see this checked in?
this isn't a high priority item, so not much has been done on this. when people get cycles, we'll probably settle on a design, post it to n.p.m.mail-news for review, and then go implement it. marking future.
Target Milestone: --- → Future
it would be nice to ship a product without that annoying default "beep" biff sound and some way to change it.
As far as Mozilla goes, they can always checkin the wav file I attached to bug 67634. Jon, feel free to checkin that file (I don't have CVS write access, and I don't think Marlon will be able to get to the sound file for Mozilla anytime soon.) For Netscape, I think Kevin Murray is exploring professional possibilites for nsbeta1, but these issues belong in bug 67634.
until we have a UI (which may be a while), I've checked in a back door. the default sound url is now a pref. you could change it like so: user_pref("mail.biff.default_sound_url","file:///tmp/seth.wav"); this should make the mac users happier. taking this bug from ryan for now.
Assignee: rcassin → sspitzer
Blocks: 74644
*** Bug 84858 has been marked as a duplicate of this bug. ***
My 2 cents, you shouldn't support esd (gnome) or arts (kde) sound architecture. It's a very bad idea, sure it may be easier to code, but then you would lose all users that do not use those wm, instead just send sound to /dev/dsp
esd isn't Gnome specific. It's actually the "enlightenment sound daemon" but runs perfectly well all on it's own - independent of GUI environment or WM.
That's not the issue here, the issue is that mozilla should not use "propietary" sound arquitectures because they only work in their native environment (ok ok, esd plays everywhere) but rather send sounds to /dev/dsp so ANY linux user can play sounds whatever they are using
I really like the suggestion that Peter Lario has made above. BTW, what happened with the "Mail Notification" app which was present on communicator, isn't Moz going to implement a similar app? For me it was very useful.
I'm jumping into the discussion late here, but is there anything that can be "borrowed" from commercial tree's UI instant messenger prefs? I'm thinking mostly of the code and graphics for playing each AIM sound from a button.
*** Bug 101050 has been marked as a duplicate of this bug. ***
I think the right thing to do here is to defer to the os. windows has a "New Mail Notification" sound (that the user can configure using the control panel) mac has internet config, where they can configure the sound on new mail. not sure about linux (beos, etc) but there has to be something. I don't think it is smart to add a XP sound picker UI to the mailnew prefs, when for most users (windows, mac) the OS already has this picker for you. here's what I want to do: On new mail, if the "play sound when mail arrives" is checked, we play the OS sound. I'll extend the nsISound interface to have playSystemSound(). in this case, we'd call it with "Mailbeep" or something. the various platforms implementations of this interface (use lxr and search for for nsSound.cpp) can take "Mailbeep" and "do the right thing". for platforms that don't have a system sound, we can use the existing code that allows for users to configure using a pref. I've got this working on windows, I'll attach a patch.
Status: NEW → ASSIGNED
Target Milestone: Future → mozilla0.9.6
*** Bug 65053 has been marked as a duplicate of this bug. ***
for mac, I think I can do this: NS_IMETHODIMP nsSound::PlaySystemSound(const char *aSoundAlias) { if (!nsCRT::strcmp("Mailbeep",aSoundAlias)) { // get the nsIInternetConfigService nsXPIDLCString newMailSound; nsresult rv = icService->GetString(eICString_NewMailSoundName, getter_Copies (newMailSound)); // play newMailSound; } return NS_OK; }
Attachment #21932 - Attachment is obsolete: true
Summary: complete "play sound when new mail arrives" pref UI. → play OS specified sound for new mail
fix landed, so this works for windows now. r=pavlov, sr=bienvenu. I'll keep this open while I work on the mac. as far as linux goes, see bug #99898
QA Contact: nbaca → sheelar
This bug was and should continue to be for UI to control *which* sound (including the OS default) is played when mail arrives. The plain ability to play only the default OS sound should be a *NEW* bug. Please change the summary back to what it was and make this bug dependent on the new one. (or am I overlooking something here?)
I second Peter's remark. See also my comment on bug 64462. It was possible for some time to have a different sound for Mozilla mail than the default one. If two mail clients were open at the same time (in my case mine and my wife's), it was clear from the sound who received the mail. Seth, please unmorph the bug to the shape it was until yesterday.
> I second Peter's remark. See also my comment on bug 64462. It was possible for > some time to have a different sound for Mozilla mail than the default one. If > two mail clients were open at the same time (in my case mine and my wife's), it > was clear from the sound who received the mail. this makes no sense. on two different machines? have no plans on morphing this bug back. I also think it's the right decision to rely on the operation system for the sound. we don't need to duplicate UI in our app that properly lives outside it. (that the same reason we don't have a volume control inside of mozilla either.)
I asked the bug reporter, and he was ok with me morphing his bug. if you want another bug, feel free to log it.
> this makes no sense. on two different machines? Of course on one machine. One Mozilla user and one whatever user (in the case of my wife it was Netscape 4.78). The pC is always on. Can you tell me how can I know now by the sound who received new mail? You killed off one of the best features of Mozilla mail. I know that it did not woek for some weeks, anyway. But I hoped it will be back soon.
[x] Play sound when mail arrives [o] Use system default sound [.] Another sound [Pick...] [Preview]
The point is that he can choose whatever sound he want to use as "another sound" from his operating system's control panel instead of us duplicating that UI.
> for platforms that don't have a system sound, we can use the existing code that > allows for users to configure using a pref. I don't understand. How would I set the sound on Linux? While the change makde was definitely an improvement, I agree that the bug should be restored. Not only for Unix OSes, but also because the OS Mailbeep prefs is the most favorite and most-observed of the sound prefs. Many apps use it. I'm not sure, but I think that ICQ and similar apps even use it, basically everything where human-human messages might go in (not just email). It is not too hard to get into a situation where one wants to have different sounds for different apps. That's why observing the OS default is very reasonable, but offering a custom way to override it is, too.
The point was made that you might have more than one profile and legitimate reasons to set a different sound to play for each one. Surely it wouldn't be that difficult to boil all this down into a couple of prefs?
But the case of having multiple profiles set up and running seems pretty uncommon to me to warrant having this additional UI. 99% of the time, people are going to be happy with the OS sound. There's currently a hidden pref for this. If someone wants to make this work, then go for it, but I don't think it needs to be exposed in the UI.
As far as I understand Seth's comment on bug 99898, the hidden pref is oficially dead since this morning. That is exactly main complain. And having two mail/messaging programs open at the same time is not that uncommon. You are lucky if the other one allows you to change the sound from the OS default. In my case the other mail program is Netscape 4.78 which does not allow this. Neither does Mozilla not (if I understand "these prefs are definitely broken now" right).
yes, the hidden pref is currently dead. Seth isn't going to fix it. But if someone else wanted to make it work, they probably could.
sfraser, there's the start of my fix to get this working on the mac. it works, but it't complete. (nothing is disposing of the snd channel yet) I'll wait until your fix for #100472 lands before I finish it.
Depends on: 100472
if someone wants to add these hidden prefs back, here's what they should do: boolean, "mail.biff.play_sound" (exists already) boolean, "mail.biff.sound_type" (0 = OS, 1 = sound alias, 2 = url to .wav file) string, "mail.biff.sound" (url to .wav, or sound alias, like "Quack", "Droplet") we'd default mail.biff.sound_type to 0, the defaults go in mailnews.js, and the code would go in nsStatusBarBiffManager.cpp (similar code to what I backed out last night). if we ever got a real biff sound and put it in our messenger.jar, we could default mail.biff.sound_type to 2 on linux, and use the chrome url for mail.biff.sound. as far as doing UI for all this, it is non trivial, and varies per platform. (you'd need to write platform specific overlays. especially the mac where we'd have a picker for the system sounds. (see #65053). I have no plans to do the UI, I've got other bugs to fix.
restoring old summary. moving to the future. this bug will cover the hidden prefs and the UI work. before someone starts hacking on the UI, post a design so we can review it. if someone adds back the hidden pref support, I'll review the patch.
Summary: play OS specified sound for new mail → implement hidden prefs and design UI for "play sound when new mail arrives"
Target Milestone: mozilla0.9.6 → Future
Tweaking SUMMARY to let "play sound" appear at the beginning.
Summary: implement hidden prefs and design UI for "play sound when new mail arrives" → Play custom sound when new mail arrives (implement hidden prefs and design UI)
No longer depends on: 100472
There is no purpose in restoring the hidden prefs, and certainly no reason for additional UI. We are respecting the OS setting, the correct thing to do. I recommend closing this.
Jennifer, can you comment on the request to restore the old prefs and UI for them? I don't see the rationale in allowing the user to depart from his system setting in the context of one app, and it doesn't seem like our place to allow that. If you agree, please mark wontfix (Seth is okay with it if you are).
I agree with blake. I spoke with jglick, and she also agrees. our users can use the OS system sound on windows and mac (linux is covered by #104174). adding prefs and UI to allow the user to override the system sound would be bloat that we don't want and don't need. marking WONTFIX.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → WONTFIX
Again, how are Linux users supposed to change the sound? Editing prefs.js does not count.
I ought to point out that this also affects Windows 95 retail (the only Windows that doesnt have Internet Explorer & Outlook preinstalled). The New Mail notification sound simply does not exist in this version of windows unless you have installed an M$ e-mail client first. However, that being said, as long there is a working pref I can put in my prefs.js, I can live without the GUI.
*** Bug 99898 has been marked as a duplicate of this bug. ***
No longer blocks: 99898
wontfix = VERY bad decision: - no UI way to select mail sound in Linux (are we M$ lemmings now?). - no way to have different sounds for different mail apps on one PC. - many users will not know to look in the OS to set a sound for an App. An app's setting should be in the app! ..who cares if M$ is trying to assimilate and confuse by offering *some* settings. - This is a highly requested feature. - Eeven smaller progs like GetRight and ICQ have this setting. - Mozilla developers need to listen more to "user logic" and less to "geek logic" (and app's setting is set in the app!!!). - A pref would only add *ONE* line to the prefs - hardly bloat!!! (see my suggestion from 2001-01-16). Therefore, please reopen and fix this bug.
For Windows and Mac it makes sense to obey the OS sound. For Linux, I think you'll get what you want if http://bugzilla.mozilla.org/show_bug.cgi?id=104174 is implemented.
Actually, since Moz and 6.x are becoming much more user configurable insofar as 'personal taste' is concerned, it makes much more sense to have the UI ability to configure a custom sound apart from the OS default notification sound. Case in point: You have multiple accounts/identities. Configure a different sound file for each identity/account. We have the choice of multiple themes, why not multiple sound files configured in each account UI?
putterman, no, that bug says nothing about UI, but a hidden pref only.
I believe this definitely should be reopened as a RFE bug. I strongly disagree with this Seth's decision, even as IMHO he is one of the top 5 Mozilla developers.
We are not in the business of adding prefs, hidden or not, to please four highly advanced users. Peter, Linux is covered elsewhere. The very reason for the OS setting is so that you don't have 8 different mail sounds for various apps. I do not believe your assertion that most users would think to look in the app settings to change the sound (and would understand how to look for 'wav' files on their computer), but not their OS settings, or even that the average user a) cares what the sound is or b) realizes it can be configured. Empty statements like "this is a highly requested feature" don't hold any water, back it up, show that the majority of Outlook Express users are clamoring to change the sound for that app, show that a majority of Mozilla's distributors believe it is in their users' best interests to have this setting. A word to the wise, you don't want to use ICQ as an example when you're arguing against bloat. Your geek logic/user logic distinction is nonsensical, because what you're arguing for is a geek feature. And finally, the it's-just-one-pref argument doesn't fly, you should stop using it in so many bugs. There's never going to be a bug that says "add 95 prefs", so yes, it will happen one at a time, but it adds up. Hidden pref or exposed, it's still bloat, and we need to stop letting it into the product unless it's something a lot of people want. Being afraid of saying 'no' and spreading the 'well, if you submit a patch I guess I'll take it' mentality is what causes us to end up with prefs like "Enable coloring for view source" that have highly visible UI.
Forgive me for being argumentative, but I don't think you have to be "a highly advanced user" to want to change the New Mail sound. Using the system default sound is a good start but it's clear that some people will want to customise it. Yes, they could trudge off to the control panel / prefs dialog in their OS if they want to pick a new sound, but assumes there is such a dialog and that the user knows where to find and use it. There is also the issue of what system default sound means. What will Mozilla do under KDE? Will Moz know to pick up my KDE default New Mail sound? Is there a default New Mail sound under KDE? Will it decide to use the GNOME one instead and confuse the hell out of users? Since we (Netscape) already have the UI for picking and playing a sound in the AIM module, I don't see why that can't be reused here.
Blake: The problem is that this feature was already working in Mozilla for some time. So my saying that it it should be a RFE is already a compromise, because it is in fact a regression. Since recently - alas - it is a deliberate regression.
>We are not in the business of adding prefs, hidden or not, to please four >highly advanced users. This is the comment of an organization that's just begging to be left in the dust by someone that actually listens to their users. I haven't spoken up on the "play sound" issue so far because others seemed to be speaking just fine on it. I am baffled, though, by the resistence of the developers to make life easier for the user (who is, after all, their sole reason for existence in this project). While I can understand the desire to avoid bloat (I didn't consider it a good thing that I ended up adding 128 MB of RAM to my system so I could run Mozilla concurrently w/ my other apps), adding a sound pref to the existing user preferences window hardly seems likely to baloon memory usage much beyond where it's already at. I'm firmly in the camp of "I want control over what sound Mozilla plays when mail arrives." The only reason I created a Bugzilla acount here was so I could more easily track the resolution to this issue. Given a choice between use the global system setting only and being able to specify a different one if I chose, I will chose the latter. Let's face it, the only reason most people are going to use Mozilla for email is because they want to have the choice of how things work. If they're content to go w/ system defaults, they're never even going to bother installing Mozilla. If you remove the ability to chose what sound Mozilla plays (separately from other apps), then you've removed one more reason for them to use Mozilla.
> We are not in the business of adding prefs, hidden or not, to please four > highly advanced users. blake, please keep to the facts. You know very well that all of us arguing here can live well with hidden prefs. We are arguing for users. BTW: We are not all in the same "business", and a lot of people argue against you, so saying "We are not in the business of..." is simply wrong. > The very reason for the OS setting is so > that you don't have 8 different mail sounds for various apps. No, the reason is not to *have to have* 8 different sounds. > There's never going to be a bug that says "add 95 prefs", Actually, there is: bug 17199. ;-P > Hidden pref or exposed, it's still bloat A hidden pref is about 10 lines of code, all included. Hardly bloat. > Since we (Netscape) already have the UI for picking and playing a sound in the > AIM module Very funny.
It seems the opinions here are divided strictly on the Netscape / non-Netscape lines. We've hit a glass ceiling here like in the case of a separate icon for Mozilla mail (where the Netscape guys are determined not to allow that). Is AIM promotion the reason Mozilla cannot have a mail sound choosing pref?
[OT] I sense something dangerous evolving here. If Netscape starts blocking features (e.g., mail sound, Mozilla icons) because it fears that Mozilla may "compete" with Netscape, then it may be time to start thinking about breaking away from Netscape and moving in a more independant and "free" direction (albeit much slower, but less incumbered by non-user-oriented politics). I hope I am mistaken on this one. [/OT] PS. Blake: I, for one, *do* want *separate* mail sounds for my mail apps. I also want to stay as far away as I can from depending on M$ configurations. Also, my wife (and later, kids) might want to have a different sound (is that handled by "user profiles" in the OS?).
This conversation is getting funny and paranoid. I actually had no idea we even let the user customize sounds in IM and am having trouble finding it in the product. The allegation that Netscape is blocking this feature because we're scared of competing with Mozilla is plain silly. The reason why Netscape contributes 99.9% of the open source mail code is because we're scared of competing with Mozilla? That's very funny. I'll have to mention that to the other conspirators back in the office. Clearly we want Mozilla to succeed and I don't think you can show any legitimate evidence to the contrary. And, I hate this notion of Netscape vs everyone else that I often see creeping into bugs. The opinions that many of us have stated in this bug are because we believe in them not because we are being told to say them. If you want this bug implemented, go ahead and implement it. Make sure there's a hidden pref so that the product can act the way it does now and not show any of the new UI. Make sure there's still a way for the user to use the default OS sound. Make sure you get the UI approved by jglick. Make sure you get it reviewed and super-reviewed. For the last two points, have the understanding that this is not going to be among jglick's or sspitzer's higher priorities and they may not even be in agreement to what I've written in this paragraph. But, if you want any chance of getting this in, someone who isn't Seth is going to have to prove this is worthwhile.
First of all I consider it a privilege unequaled to be able to *argue* with a developer. Where else can an *ordinary user* accomplish this feat. Second, I am a 58 yr old Master Certified Netware Engineer and Certified Novell Instructor that lunches with Corporate Executives to seek high-level contracts. I usually do this dressed in VERY starched $100+ dress shirts. I simply *love* coming home, standing the shirt up in the corner, throwing on the Netscape T-Shirt and lounge pants and listening to Curley (Stooges) telling me I have mail "yuk yuk yuk" in one address or George Carlin spouting "There's a letter in your mailbox" in another. 'nuff said ?? I like the choice as do many many others no matter if they're an 8 yr old kiddie or a 58 yr old curmudgeon such as myself. :-D
> it's clear that some people will want to customise it. Adam: that's the thing; I don't think we are sure. I don't think a couple people in a bug is a worthwhile gauge (unless you're referring to other data). Personally I'd prefer to see feedback from milestones and distributor releases before determing whether enough people want to change it such that it deserves a pref. Anyways, putterman is right, the conversation just turned borderline absurd so let's take it to the newsgroups if anyone wants to continue...I'd just like to point out the absolute absurdity of the Netscape vs. Mozilla quarrel some of you have yet again turned this into. Has anyone yet considered the fact that I (who is saying the pref is unnecessary) no longer work for Netscape, and that Adam (who has expressed interest in the pref) does? The conspiracy cover up plan is right on track.
my suggestion is that everyone takes a minute and thinks about where this would fall in our current list of priorities. How does this rank against crash bugs, data loss bugs, performance improvements, other bugs, and new features? Keep in mind, every bug has a cost. The time and energy of each developer, code reviewer, code super reviewer, QA, and UI designer are limited resources. I'm going to go spend my time on things that I feel are more important.
Seth: The problem is not that you do not have time to implement this. The problem is that making this bug WONTFIX, you in fact disallow implementing this by anyone. It's clear that when people with the amount of brownie points in the Mail/News Module as sspitzer and putterman say something should not be implemented, it will not be implemented. You earned the strong voice with the good job you guys do. That's OK with me. But please, be careful with the use of this power for decisions closing the way of implementing useful features.
"open source" does not mean "anything goes if you've got the patch", and that dangerous mentality is why we've got a lot of problems these days. The WONTFIX resolution exists for a reason and module owners should not be afraid to use it.
Was the final outcome of sound mailnotification on Linux that the option is now between enabling and disabling the system "beep" from an internal speaker?
Correction on the IM stuff. It doesn't have the facility to change the sound from the prefs, but there are buttons (and code) for playing sounds from the dialog and the sounds that it plays are specified by hidden prefs, "aim.buddy.SndPlayFirstIncoming", "aim.buddy.SndOutgoing" etc. To see the dialog look under Prefs|Instant Messenger|Notification". To see the hidden prefs open <NS6.1>\defaults\prefs\aim.js. The sounds themselves are packed into the skin files, classic.jar & modern.jar under skin\classic\aim\sounds & skin\modern\aim\sounds. The code itself for playing the sound is pretty straightforward. It be seen by opening aim.jar and viewing pref-IM_notification.xul & prefIM.js files. The PlaySound function in prefIM.js is pretty straightforward, reading the sound URL from the pref and telling the "@mozilla.org/sound;1" object to play it.
for linux, see bug http://bugzilla.mozilla.org/show_bug.cgi?id=104174 once we get a sound (see bug #64475), we'll package it with the linux build and point to it internally using the "system.sound._moz_mailbeep" approach described in #104174
now that we're going to have a way to generically extend the account manager and nsIMsgIncomingServer and nsIMsgIdentity (see bug #107068), we will be able to do this. once #107068 lands, something could do this: nsStatusBarBiffManager::OnItemPropertyFlagChanged() to pass item to PerformStatusBarBiff(), and then in PerformStatusBarBiff(), you'd QI item to an nsIMsgFolder, then get the incoming server from the folder, and then do rv = server->GetStringAttribute("biffSystemSound", getter_Copies(biffSystemSound)); in mailnews.js, we'd set the default for that to be "_moz_mailbeep" that gets this working, without any ui, and in the default case, we still play the os sound for new mail notification. for the UI, someone have to create an extension, say the "biffsound" extension. (see 107068 for how to implement an extension). that extension to the account manager would shown up only on servers that had "incoming" mail. for your am-biffsound.xul, you'd have to do all the hard work to come up with a ui for picking system sounds. that's the hard part, that's why this bug was marked wontfix. (I'd suggest a simple text box, for the first version.) if someone wants to do all this work, feel free to reopen and take the bug.
Depends on: 107068
verified as won't fix.
Status: RESOLVED → VERIFIED
> that's the hard part, that's why this bug was marked wontfix WHAT? Because something is "hard to fix" should NEVER be a reason to not fix it!!! Marking it "future" and "trivial" would have been better than this. Not fixing this is an outrage! One of the worst offenses of windoze is integrating itself all over my harddrive and system. I prefer to have my applications and their settings within the application itself. Wontfixing this bug is a horrible mistake that I trust you will reconsider.
Peter, calm down. Not implementing this RFE (it's not a bug) is not an `outrage'; you are not Seth's manager, and it's not really any of your business what he works on. And wontfixing this bug is not a `horrible mistake'; certainly it is a mistake which Netscape mail/news engineers often make -- thinking that `I am not interested in this right now' means `no-one else should be interested in it either' -- but that's more a bug in Bugzilla (existence of default assignees) and in their employment contracts (must spend more time coding/reviewing Netscape work, and less time reviewing outside work) than it is a fault in their personalities. Using the system sound for new mail is not a bug, and the platform control panel is the right place to set that sound, since I shouldn't have to set the sound in several different places if I install or use multiple mail programs. However: (1) on Windows 95, you can't set this pref in the platform control panel (comment 54); (2) on Mac OS, *generally* expected behavior is for apps to have their own UI for prefs which affect them, and to write them to (as well as reading them from) the Internet control panel settings when appropriate; (3) the Mac OS Internet control panel has checkboxes not only for playing a sound, but also for flashing the icon and/or showing an alert, and Mozilla not supporting the latter two could lead users to believe that the former setting in Mozilla will be in app-specific UI too; (4) on Linux etc., platform UI for this is (alas) often not there; (5) on any platform, there would appear to be substantial benefit for a non-trivial number of users in allowing different notifications for new messages in different accounts (though this may perhaps be better implemented as a `play sound' action for mail filters, since that would be more flexible). (1), (2), and (5) are solid reasons to implement this, and (3) and (4) are bugs (in Mozilla and in Linux distros, respectively) which implementing it would work around. Since all those reasons exist, since Putterman and Seth have both said that they would be ok with someone else implementing it (i.e. the WONTFIX was an error), and since I feel I've got enough karma since I'm usually the one asking for *fewer* prefs, I'm reopening this and reassigning to nobody.
Severity: normal → enhancement
Status: VERIFIED → REOPENED
Resolution: WONTFIX → ---
--> nobody
Assignee: sspitzer → nobody
Status: REOPENED → NEW
Target Milestone: Future → ---
[OT] This situation proved a very serious problem with this project. It is obvious that even Netscape engineers do not understand even basic functions of bugzilla. To mark a bug (even if it is RFE) as WONTFIX because it is "difficult", or because the assignee doesn't have the time is a serious misunderstanding of the process. It is obvious even to me (the "monkey in the machine") that the proper reaction should have been: assigned to: nobody, TM: future, keywords: helpwanted. I shiver to think of how many useful features may have been swept under the "wontfix" carpet because of this - brrr. mpt, thanks for fixing some of your "karma". The universe is now slightly more in balance - ohmmmm. ;) [/OT]
It seems that as at 2002030803 Mozilla disregards the "No Sound" schema when running on Windows. I was forced to check off Prepferences/Mail & Newsgroup/Play sound When New Message arrive to stop the beeping.
If I remember correctly, the "default beep" will play regardless of the sound settings in control-panel as it should. That being said, the correct action is to do exactly what you did in the prefs.
Mac OS X has no system-wide option for selecting a biff sound, which is a problem I'm sure Apple will eventually fix. In the meantime, adding a preference to override the OS default is as important on Mac OS X as it is on Win95 and Linux. I currently get the same sound for 1) new mail, 2) people saying things to me in Chatzilla, 3) beeps in Terminal windows, 4) alerts from other applications. Thanks for not leaving this wontfix. :-)
QA Contact: sheelar → stephend
about to check in some back end code for this. haven't decided yet how to do the front end.
Assignee: nobody → sspitzer
Target Milestone: --- → mozilla1.2beta
Attached patch patch for backend (obsolete) (deleted) — — Splinter Review
Attachment #52866 - Attachment is obsolete: true
Attachment #52996 - Attachment is obsolete: true
so to use this, set this pref: user_pref("mail.biff.play_sound.url", "file:///C:/winnt/media/chimes.wav"); note, it needs to be a file url and it needs to be a wave file. working on the UI...
Status: NEW → ASSIGNED
Seth, why not using the pref that actually once worked: user_pref("mail.biff.sound_file", "file:///C:/winnt/media/chimes.wav"); instead of user_pref("mail.biff.play_sound.url", "file:///C:/winnt/media/chimes.wav"); ? Using "url" in the name creates a false impression that any url will work.
Attached image screen shot (obsolete) (deleted) —
here's how it looks now, just a plain text box. it defaults to _moz_mailbeep. it works if you give it a system sound or a file url to a .wav file. what I plan on doing is implementing a new, in memory datasource, so that I can do this: <menulist id="mailnewsSoundFileUrl" preftype="string" prefstring="mail.biff.play_sound.url"> <menupopup id="mailsoundspopup" ref="moz-systemsounds:/" datasources="rdf:systemsounds"> <template> <rule> <menuitem value="..." label="rdf:http://home.netscape.com/NC-rdf#Name"/> </rule> </template> </menupopup> </menulist> that will be friendly to both user specified sounds and to the sounds on the system.
Attachment #99317 - Attachment is obsolete: true
Seth: Not to put a "fly in the ointment" at this juncture but can something like this be done on an account by account basis? In other words, can we have a different sound for *each* account, ie., "chimes.wav" for Account-A and "chord.wav" for Account-B, so forth and so on?
That's a neat idea. Mozilla normally plays the system-wide biff sound for all accounts, and this is a way to override it for those of us who don't have system-wide biff sounds. Perhaps there should be an additional per-account preference to override this global (to Mozilla) preference?
> but can something like this be done on an account by account basis? In other > words, can we have a different sound for *each* account, ie., "chimes.wav" > for Account-A and "chord.wav" for Account-B, so forth and so on? yes, that's next. there will be per account overrides, just like there are for other global prefs.
seth, could you create "diff -u" patches in the future? they are easier to read, imho... thanks
Attached image screen shot (obsolete) (deleted) —
patch coming. the patch works on all platforms, but is only really interesting on win32. on win32, I look in the registry to find the C:\WINNT\Media directory (or C:\Windows\Media, for win98). then, I populate the picker for all files that end with .wav and that don't contain %20. (If I could get a "pretty name" from a file, I couldn't have to do this.) note, if the user defines a wav file on their own, it will show up in the picker. so on linux, or mac, if I set the pref to be some other wav file, it will show up. note, _moz_mailbeep always shows up, as the pretty name is "System New Mail Sound". This is always supported, as we map this system sound to the new mail sound, or just plain old beep. I've also added a preview button that plays the current sound. The next steps: 1) fixing how I determine the pretty name of a .wav file 2) mac build changes so I can land. 3) add code for mac (mac should be easy, assuming I can just enumerate all the system sound.) Patch on the way.
4xp, as mac had this in 4.x
Keywords: 4xp
Attached patch patch (obsolete) (deleted) — — Splinter Review
another todo idea, move "System New Mail Sound" to a string bundle.
note, once this work is done, I'll be able to add per server overrides. I'll then fix the sound datasource so that any custom server sounds show up in the picker. We'll have to relnote that the way to add new sounds to the picker is (for win32) to copy them into the Media directory. for mac, I think they'll just show up once the user creates them.
Suggestion: Please add a *Browse* button for users whose media files are stored in different places. (Of course, Mozilla should _remember_ the last used directory)
Seth: Do you realize just *how many* .wav files there are in /windows/media ?? If the user that installs Windows and chooses to install the Media package, the directory will contain approximately 150 wave files !! I can't imagine a UI "file picker" with 150 wave files. However, once we get away from /media/ then we run into user problems insofar as exactly which directory to use and/or copy wave files to. This can be a no-win situation as I see it so far. Suggestions anyone?
Suggestion already .. The install bits installs a /sounds/ directory with a pre-packaged assortment of wave files to choose from in the "picker". If the user wants *more* then they can copy over whichever files they want to /sounds/ or something along those lines. Of course this pre-package will contain the "System New Notification".
Maybe I misunderstood Usabilitiy but I would strongly vote for ryan's first screenshot. Every User should be able to hit the "Browse" button and to search for sound files, or if not he/she leaves the settings as they are and get sound as well. My 2 EUR //Carsten
jay, thanks for the heads up about the number of sound files. I'll work with jglick on the UI issue, including the "browse" button. as far as code goes, I'm going to move the windows specific code of nsSoundDatasource.cpp and into nsMessengerWinIntegration.cpp, where I should have put it in the first place.
Blocks: 104174
My vote is for the "browse" button instead of the "picker". A MUCH better option and every user that I know of can use a "browse" button. In addition, it keeps the UI slim and trim.
the picker is good for default system sounds, like on mac. I'll talk to jglick, she might think browser for windows, and nsSoundDatasource / picker for mac only.
Attached patch alternative patch. not complete yet. (obsolete) (deleted) — — Splinter Review
this alternative patch is just a start. I'll screen shot it. what we need is a sound picker overlay, that can be textbox, choose file, preview button for win32/linx, and menulist & preview button for mac (using nsSoundDatasource)
I like that UI much better than a "picker" for the PC simply because what files do YOU choose for the picker. Gonna get flack from the users if NS picks the wrong ones. Also, if you use the picker approach ONLY, the question concerning a "browse" button in addition is going to be a main topic, and to include both is not advisable - too much UI bloat IMHO. Stick with the browse-button and let the user decide totally !! Including a "picker" would be the same as a "signature picker" where NS would choose some "snazzy" sig lines that most users would deem to be 'screwball'.
FYI: on classic Mac OS, system sounds aren't .wav files, they're sound resources stored within the System suitcase. If the user selects their own file, we should support .wav and .aiff and System 7 sounds (file type "sfil" containing a resorce type "snd "). On Mac OS X, sounds are in one of the Library/Sounds folders, and the standard format is .aiff. Of course, we should search /System/Library/Sounds and /Library/Sounds and ~/Library/Sounds, in addition to letting the user select something with the Browse button. Strip off the extension, capitalize the first letter if it's not already - is there a prettier name than this somewhere?
*** Bug 169174 has been marked as a duplicate of this bug. ***
Attached patch patch, following jglick's suggested UI. (obsolete) (deleted) — — Splinter Review
Attached patch new patch (obsolete) (deleted) — — Splinter Review
Attachment #99433 - Attachment is obsolete: true
Attachment #99435 - Attachment is obsolete: true
Attachment #99635 - Attachment is obsolete: true
Attached image screen shot (deleted) —
Attachment #99320 - Attachment is obsolete: true
Attachment #99341 - Attachment is obsolete: true
Attached patch updated patch (obsolete) (deleted) — — Splinter Review
Attachment #99636 - Attachment is obsolete: true
the mac system sound picker is now bug 169384 until that's fixed, this is the UI we'll see on all platforms.
Attached patch final patch (obsolete) (deleted) — — Splinter Review
Attachment #99638 - Attachment is obsolete: true
Attached patch final patch (deleted) — — Splinter Review
Attachment #99640 - Attachment is obsolete: true
fixed. if there are new issues, let's log new bugs.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago22 years ago
Resolution: --- → FIXED
Comment on attachment 99641 [details] [diff] [review] final patch this patch uses a string preference for the filename... not sure if that's a good idea, in other places, a complex value of type nsIFile (or nsILocalFile, not sure) is used, which seems to be important for mac
Comment on attachment 99650 [details] [diff] [review] backend patch to respect the new prefs. umm + rv = pref->GetCharPref(PREF_NEW_MAIL_SOUND_URL, getter_Copies(soundURLSpec)); didn't you save "fp.file.path" in the preference? that is not an url, it's a normal filesystem path...
I wanted both file urls and native paths to work. I got lucky on windows because of how PlaySystemSound() works, I dont think this will work right on linux and mac. I'll work on nsStatusBarBiffManager.cpp tomorrow, so that the native file paths work right on that platform.
for those interested in the native path issue, see bug 169414
You want to use persistentDescriptor to store a path I think (http://lxr.mozilla.org/seamonkey/source/xpcom/io/nsILocalFile.idl#118. It seems like nsIPrefBranch does the right thing if you call [Set|Get]ComplexValue with a nsILocalFile.
FWIW, Mac users will squirm uncomfortably if you show them a path to a system sound in the prefs.
The goal is to have a different UI for Mac for this reason. BTW, this is a really nice feature. It appears to work great in this morning's build on Windows.
Don't you think that the "Preview" Button is misleading ? The Question is: How can I Pre *view* a sound file ? Better would be simply "Listen".
Ahh, yes suggestion for the MAC users. I can understand somehow that MAC users are not comfortable with files and Directory Structure of their system. So I think a good point to start could be that dependend of the platform used, if you hit browse that you start to browse in the directory where normally the system sound files are on that platform, e.g C:\Winnt\system32\sound or /Library/Sounds/ or /usr/share/sound.
Bootsy: In Windows cntrl-panel/sounds it's "preview", so I think it's relative to name it "preview" in keeping with the Windows tradition.
Well, I'm on Linux, I used Windows some time ago :-) But who said that Bill Gates is a Master of Usability and Intutive Design ? I think a guy who implemented a "Start" Button, which you have to hit to power down the machine, is not. I think the Apple Developers have a better UI Guide, so what do they use ? I would still vote for "Listen" or something similar, but I accept that OpenSource is democratic.
I don't have a problem with "Listen" but it's not consistent with what "Joe User" is accustomed to seeing/using. This is a minor issue at best.
I agree that this is only a minor issue, of course. As I do not have a MAC, it would be interesting what the MAC user sees, is it also "Preview" on a Mac ? I don't know.
Regarding comment #130, the problem is not that Mac users are not comfortable with files and the directory structure of their system; the problem is that system sounds are not files, they're resources contained within the System file. You could fake a file path by pretending the file is a folder and the sound resources are files (the Finder pretends this for UI), but this is actually NOT the file structure. In fact, as I understand it, because these resources are in the System file which is always open, they are always available to any application without USING a file path at all. The proper way to handle these is, in fact, having a sound picker menu. If a user got creative with ResEdit and pasted a sound resource into the Mozilla application, or into a font suitcase and dropped it in the Fonts folder, or possibly into prefs.js (I'm not sure about this one), or something else bizarre, it should be available in the menu, because it's an available resource as long as the file is open. This will not make sense to anyone who isn't a Mac user, and probably not make sense to most Mac users either, but that's the way the OS works.
Win98SE Mozilla 2002091908 The addition of the BROWSE/PREVIEW feature doesn't work. The file that is already there from the previous feature addition works with PREVIEW. However, browsing to another .wav file and then pressing PREVIEW invokes the default Windows BEEP and not the file selected. Getting new mail also invokes the BEEP. Choosing the default system sound still works.
Ok, here's the problem. When browsing to the file location, it displays in the window as: C:\WINDOWS\MEDIA\Gotmail.wav It should be: file:///C:\WINDOWS\MEDIA\Gotmail.wav This works 100% if manually changed.
I'm using Win XP and both the preview button and mail notification sound work fine with my custom sound.
>When browsing to the file location, it displays in the window as: > C:\WINDOWS\MEDIA\Gotmail.wav >It should be: > file:///C:\WINDOWS\MEDIA\Gotmail.wav yeah, I raised that issue already in comment 123
Tried this on another box running Win98SE and it doesn't work unless you add the file:/// to C:/path/to/sound.wav
putterman: does adding file:/// prepending the path also work in your XP? If so, then I recommend that file:/// should be the Windows OS default for this feature.
Both ways work for me. Anyway we can still display it as "C:\\filename" but make it do the right thing in the back end?
I'm using Linux build 2002091908 and it also only works if file:// is there. Using the browse button to choose the file does not include the file:// as needed. Glad to have sound though. Thank you.
I'll probably end up filing this as a separate bug: I can browse to C:\Documents and Settings\Administrator\Desktop\PushNevada.txt and click Preview and have it play my default system sound. Question: Should we do file-type checking by extension, and on Mac by the fork, or is that evil? The user should know the valid file types for sounds, but you never know ;-) It's also weird that with the selection of 'System Default Sound', the 'Preview' button is disabled. Seth, in order to keep this bug clutter-free, do you want the new bugs marked as a dependancy on this?
It is left a little bit unclear if this bug should also fix on Linux. I build off the trunk today, but I still have only the PC Speaker beep. Nothing come out of my speakers so far, no matter if I choose System Sound or I choose my own .wav file.
Carsten, The Linux builds appear to have the same problem. What worked for me was to prepend "file://" to the location of the sound file I chose. For example: /home/username/mailsound.wav Should look something like this: file:///home/username/mailsound.wav
busy working on spam, but I will get back to this. here's the problem for linux / mac: I need to fix the path handling code. see bug 169414 I need to make it work for both file:// and native paths the side effect of this bug is that on linux, any native path will be the system beep.
from comment #124 "I wanted both file urls and native paths to work. I got lucky on windows because of how PlaySystemSound() works." on win2k and winxp, I think playsystemsound(), which calls some win32 sound api takes the path, and plays it. that's how I got lucky. it sounds like on win98, not so lucky. this will be fixed when I fix 169414. I hope this helps. jay, can you spread the word in bugs and newsgroups?
> jay, can you spread the word in bugs and newsgroups? Sure, but I think I'll wait for a bug report post first.
Woooha, finally I could wipe out Softbeep. Works perfectly. Had to use file:///usr/share/sounds/freakinout.wav :-) Thanx, for this long awaited feature
So, it works for you just like I said in comment #137 .. good!
yes, exactly like in #137 with the sole exception that I don't have C:\Winnt\Media here on Linux :-)
Just one last question, could it be possible that this broke the "Play Sound" of the Calendar ? As I just figured out that, in the past working "playing sound on Events" does not work anymore. I hear nothing at the moment.
On Linux trunk build 2002100911 I try specifying a filename; file:///home/james/music/wav/popup.wav but when I hit the preview button nothing happens. I get the following error in the Javascript console: Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISound.play]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://messenger/content/pref-notifications.js :: PreviewSound :: line 63" data: no] I know the wav file is okay, as I can play it from the command-line: bash# aplay /home/james/music/wav/popup.wav Playing WAVE '/home/james/music/wav/popup.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
looks like sound notification works on both the commercial cfm trunk build (2002.11.12.08) and the mach-o mozilla build (2002.11.12.07) on mac 10.2.2, at least when using the system sound/beep.
posted Bug 180009 aboutt he javascript error in Linux
I have no JavaScript error but despite of that the sound doesn't play for some time now, last checked with trunk build of Dec 30th on Linux. However 'play' on the console does work. I do not even get a beep when I select a custom sound. I tried both, the file in 'file:///' syntax and in system path syntax '/usr/local/sounds/somesound.wav'. Reopen ?
No longer blocks: 104174
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: