Bug 874899 - Hide new options in Notifications pref pane when the old alert is selected. r=IanN, ui-r=Neil, a=IanN
--- a/suite/mailnews/prefs/pref-notifications.js
+++ b/suite/mailnews/prefs/pref-notifications.js
@@ -9,16 +9,23 @@ var gSoundUrlPref = null;
function Startup()
{
// if we don't have the alert service, hide the pref UI for using alerts to notify on new mail
// see bug #158711
var newMailNotificationAlertUI = document.getElementById("newMailNotificationAlertBox");
newMailNotificationAlertUI.hidden = !("@mozilla.org/alerts-service;1" in Components.classes);
+ // as long as the old notification code is still around, the new options
+ // won't apply if mail.biff.show_new_alert is false and should be hidden
+ document.getElementById("showAlertPreviewText").hidden =
+ document.getElementById("showAlertSubject").hidden =
+ document.getElementById("showAlertSender").hidden =
+ !Services.prefs.getBoolPref("mail.biff.show_new_alert");
+
// animate dock icon option currently available for Mac OSX only
var newMailNotificationBouncePref = document.getElementById("newMailNotificationBounceBox");
newMailNotificationBouncePref.hidden = !navigator.platform.startsWith("Mac");
// show tray icon option currently available for Windows only
var newMailNotificationTrayIconPref = document.getElementById("newMailNotificationTrayIconBox");
newMailNotificationTrayIconPref.hidden = !navigator.platform.startsWith("Win");