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:
scott%scott-macgregor.org 2006-11-10 16:39:16 +00:00
Родитель 7cb9db6c02
Коммит 08583fc06c
4 изменённых файлов: 29 добавлений и 23 удалений

Просмотреть файл

@ -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,10 +110,9 @@
#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();"/>
preference="mail.biff.play_sound" label="&playSound.label;" flex="1"/>
<button id="customizeNewMailBehavior" label="&customizeNewMailBehavior.label;" accesskey="&customizeNewMailBehavior.accesskey;"
oncommand="gGeneralPane.customizeNewMailBehavior();"/>
</hbox>
</groupbox>

Просмотреть файл

@ -67,8 +67,11 @@ var gNotificationsDialog = {
{
var soundUrlLocation = document.getElementById("soundUrlLocation");
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="&notificationsDialog.title;">
title="&notificationsDialog1.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"/>
</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