mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug #360030 --> Add the ability to customize the fields we show in the new mail alert notification dialog. sr=bienvenu
This commit is contained in:
parent
7cb9db6c02
commit
08583fc06c
@ -38,14 +38,12 @@
|
||||
|
||||
var gGeneralPane = {
|
||||
mPane: null,
|
||||
mSound: null,
|
||||
|
||||
init: function ()
|
||||
{
|
||||
this.mPane = document.getElementById("paneGeneral");
|
||||
|
||||
this.startPageCheck();
|
||||
this.mailSoundCheck();
|
||||
},
|
||||
|
||||
#ifdef HAVE_SHELL_SERVICE
|
||||
@ -108,12 +106,7 @@ var gGeneralPane = {
|
||||
"", null);
|
||||
},
|
||||
|
||||
mailSoundCheck: function()
|
||||
{
|
||||
document.getElementById("soundButton").disabled = !document.getElementById("newMailNotification").checked;
|
||||
},
|
||||
|
||||
showAdvancedSound: function()
|
||||
customizeNewMailBehavior: function()
|
||||
{
|
||||
document.documentElement
|
||||
.openSubDialog("chrome://messenger/content/preferences/notifications.xul",
|
||||
|
@ -101,10 +101,8 @@
|
||||
|
||||
<groupbox flex="1">
|
||||
<caption label="&newMessagesArrive.label;"/>
|
||||
|
||||
<checkbox id="newMailNotificationAlert" label="&showAnimatedAlert.label;"
|
||||
preference="mail.biff.show_alert"
|
||||
accesskey="&showAnimatedAlert.accesskey;"/>
|
||||
<checkbox id="newMailNotificationAlert" label="&showAnimatedAlert.label;" flex="1" accesskey="&showAnimatedAlert.accesskey;"
|
||||
preference="mail.biff.show_alert"/>
|
||||
#ifdef XP_MACOSX
|
||||
<checkbox id="newMailNotificationBounce" label="&bounceSystemDockIcon.label;"
|
||||
preference="mail.biff.animate_dock_icon"
|
||||
@ -112,11 +110,10 @@
|
||||
#endif
|
||||
<hbox align="center" flex="1">
|
||||
<checkbox id="newMailNotification" accesskey="&playSound.accesskey;"
|
||||
preference="mail.biff.play_sound" label="&playSound.label;" flex="1"
|
||||
oncommand="gGeneralPane.mailSoundCheck();"/>
|
||||
<button id="soundButton" label="&soundbutton.label;" accesskey="&soundbutton.accesskey;"
|
||||
oncommand="gGeneralPane.showAdvancedSound();"/>
|
||||
</hbox>
|
||||
preference="mail.biff.play_sound" label="&playSound.label;" flex="1"/>
|
||||
<button id="customizeNewMailBehavior" label="&customizeNewMailBehavior.label;" accesskey="&customizeNewMailBehavior.accesskey;"
|
||||
oncommand="gGeneralPane.customizeNewMailBehavior();"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
<groupbox>
|
||||
|
@ -66,9 +66,12 @@ var gNotificationsDialog = {
|
||||
readSoundLocation: function()
|
||||
{
|
||||
var soundUrlLocation = document.getElementById("soundUrlLocation");
|
||||
soundUrlLocation.value = document.getElementById("mail.biff.play_sound.url").value;
|
||||
soundUrlLocation.label = this.convertURLToLocalFile(soundUrlLocation.value).leafName;
|
||||
soundUrlLocation.image = "moz-icon://" + soundUrlLocation.label + "?size=16";
|
||||
soundUrlLocation.value = document.getElementById("mail.biff.play_sound.url").value;
|
||||
if (soundUrlLocation.value)
|
||||
{
|
||||
soundUrlLocation.label = this.convertURLToLocalFile(soundUrlLocation.value).leafName;
|
||||
soundUrlLocation.image = "moz-icon://" + soundUrlLocation.label + "?size=16";
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
|
||||
|
@ -51,20 +51,33 @@
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
dlgbuttons="accept,cancel"
|
||||
style="width: &window.width; !important;"
|
||||
title="¬ificationsDialog.title;">
|
||||
title="¬ificationsDialog1.title;">
|
||||
|
||||
<prefpane id="NotificationsDialogPane" onpaneload="gNotificationsDialog.init();">
|
||||
<script type="application/x-javascript" src="chrome://messenger/content/preferences/notifications.js"/>
|
||||
|
||||
<preferences>
|
||||
<preference id="mail.biff.alert.show_preview" name="mail.biff.alert.show_preview" type="bool"/>
|
||||
<preference id="mail.biff.alert.show_subject" name="mail.biff.alert.show_subject" type="bool"/>
|
||||
<preference id="mail.biff.alert.show_sender" name="mail.biff.alert.show_sender" type="bool"/>
|
||||
<preference id="mail.biff.play_sound.type" name="mail.biff.play_sound.type" type="int"/>
|
||||
<preference id="mail.biff.play_sound.url" name="mail.biff.play_sound.url" type="string"/>
|
||||
<preference id="mail.biff.play_sound.url" name="mail.biff.play_sound.url" type="string"/>
|
||||
</preferences>
|
||||
|
||||
<stringbundle id="bundlePreferences" src="chrome://messenger/locale/preferences/preferences.properties"/>
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
<groupbox>
|
||||
<caption label="&soundNotification.caption;"/>
|
||||
<caption label="&alertCustomization.caption;"/>
|
||||
<description>&alertCustomization.intro;</description>
|
||||
<checkbox id="previewText" class="indent" label="&previewText.label;" accesskey="&previewText.accesskey;" preference="mail.biff.alert.show_preview"/>
|
||||
<checkbox id="subject" class="indent" label="&subject.label;" accesskey="&subject.accesskey;" preference="mail.biff.alert.show_subject"/>
|
||||
<checkbox id="sender" class="indent" label="&sender.label;" accesskey="&sender.accesskey;" preference="mail.biff.alert.show_sender"/>
|
||||
</groupbox>
|
||||
#endif
|
||||
|
||||
<groupbox>
|
||||
<caption label="&soundNotification1.caption;"/>
|
||||
<radiogroup id="newMailNotificationType" preference="mail.biff.play_sound.type" orient="vertical" oncommand="gNotificationsDialog.systemSoundCheck();">
|
||||
<radio value="0"
|
||||
#ifdef XP_MACOSX
|
||||
|
Loading…
Reference in New Issue
Block a user