fix for bug #158711. don't show the "show and alert" pref UI for platforms

(like linux) that don't have the alert service.
r/sr=dmose, a=asa
This commit is contained in:
sspitzer%netscape.com 2003-01-30 00:46:28 +00:00
parent dd7b545622
commit c3753032f5
2 changed files with 20 additions and 0 deletions

View File

@ -1,6 +1,16 @@
function Startup()
{
PlaySoundCheck();
// if we can't get the alert service, hide the pref UI for using alerts to notify on new mail
// see bug #158711
try {
var alertService = Components.classes["@mozilla.org/alerts-service;1"].getService(Components.interfaces.nsIAlertsService);
}
catch(ex) {
var newMailNotificationAlertUI = document.getElementById("newMailNotificationAlert");
newMailNotificationAlertUI.setAttribute("hidden","true");
}
}
function PlaySoundCheck()

View File

@ -1,6 +1,16 @@
function Startup()
{
PlaySoundCheck();
// if we can't get the alert service, hide the pref UI for using alerts to notify on new mail
// see bug #158711
try {
var alertService = Components.classes["@mozilla.org/alerts-service;1"].getService(Components.interfaces.nsIAlertsService);
}
catch(ex) {
var newMailNotificationAlertUI = document.getElementById("newMailNotificationAlert");
newMailNotificationAlertUI.setAttribute("hidden","true");
}
}
function PlaySoundCheck()