diff options
Diffstat (limited to 'comm/suite/mailnews/components/prefs')
19 files changed, 1981 insertions, 0 deletions
diff --git a/comm/suite/mailnews/components/prefs/content/mailPrefsOverlay.xul b/comm/suite/mailnews/components/prefs/content/mailPrefsOverlay.xul new file mode 100644 index 0000000000..2a4acef93b --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/mailPrefsOverlay.xul @@ -0,0 +1,102 @@ +<?xml version="1.0"?> +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + + +<!DOCTYPE overlay [ +<!ENTITY % mailPrefsOverlayDTD SYSTEM "chrome://messenger/locale/mailPrefsOverlay.dtd"> +%mailPrefsOverlayDTD; +]> + +<overlay id="mailPrefsOverlay" + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + + <preferences id="appearance_preferences"> + <preference id="general.startup.mail" + name="general.startup.mail" + type="bool"/> + <preference id="general.startup.addressbook" + name="general.startup.addressbook" + type="bool"/> + </preferences> + + <!-- mail startup toggle --> + <groupbox id="generalStartupPreferences"> + <checkbox id="generalStartupMail" + insertafter="generalStartupBrowser" + label="&mail.label;" + accesskey="&mail.accesskey;" + preference="general.startup.mail"/> + <checkbox id="generalStartupAddressBook" + insertafter="generalStartupEditor,generalStartupMail" + label="&addressbook.label;" + accesskey="&addressbook.accesskey;" + preference="general.startup.addressbook"/> + </groupbox> + + <!-- category tree entries for mail/news --> + <treechildren id="prefsPanelChildren"> + <treeitem container="true" + id="mailnewsItem" + insertafter="navigatorItem" + label="&mail.label;" + prefpane="mailnews_pane" + url="chrome://messenger/content/pref-mailnews.xul" + helpTopic="mail_prefs_general"> + <treechildren id="messengerChildren"> + <treeitem id="viewingMessagesItem" + label="&viewingMessages.label;" + prefpane="viewing_messages_pane" + url="chrome://messenger/content/pref-viewing_messages.xul" + helpTopic="mail_prefs_display"/> + <treeitem id="notificationsItem" + label="¬ifications.label;" + prefpane="notifications_pane" + url="chrome://messenger/content/pref-notifications.xul" + helpTopic="mail_prefs_notifications"/> + <treeitem id="composingItem" + label="&composingMessages.label;" + prefpane="composing_messages_pane" + url="chrome://messenger/content/messengercompose/pref-composing_messages.xul" + helpTopic="mail_prefs_messages"/> + <treeitem id="formattingItem" + label="&format.label;" + prefpane="formatting_pane" + url="chrome://messenger/content/messengercompose/pref-formatting.xul" + helpTopic="mail_prefs_formatting"/> + <treeitem id="addressItem" + label="&address.label;" + prefpane="addressing_pane" + url="chrome://messenger/content/addressbook/pref-addressing.xul" + helpTopic="mail_prefs_addressing"/> + <treeitem id="junkItem" + label="&junk.label;" + prefpane="junk_pane" + url="chrome://messenger/content/pref-junk.xul" + helpTopic="mail-prefs-junk"/> + <treeitem id="tagsItem" + label="&tags.label;" + prefpane="tags_pane" + url="chrome://messenger/content/pref-tags.xul" + helpTopic="mail-prefs-tags"/> + <treeitem id="receiptsItem" + label="&return.label;" + prefpane="receipts_pane" + url="chrome://messenger/content/pref-receipts.xul" + helpTopic="mail-prefs-receipts"/> + <treeitem id="characterEncodingItem" + label="&characterEncoding2.label;" + prefpane="character_encoding_pane" + url="chrome://messenger/content/pref-character_encoding.xul" + helpTopic="mail_prefs_text_encoding"/> + <treeitem id="offlineItem" + label="&networkStorage.label;" + prefpane="offline_pane" + url="chrome://messenger/content/pref-offline.xul" + helpTopic="mail_prefs_offline"/> + </treechildren> + </treeitem> + </treechildren> + +</overlay> diff --git a/comm/suite/mailnews/components/prefs/content/pref-character_encoding.js b/comm/suite/mailnews/components/prefs/content/pref-character_encoding.js new file mode 100644 index 0000000000..0ae30e9b1f --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-character_encoding.js @@ -0,0 +1,41 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// The contents of this file will be loaded into the scope of the object +// <prefpane id="character_encoding_pane">! + +var updatingPref = false; + +function Startup () +{ + PrefChanged(document.getElementById('mailnews.view_default_charset')); + PrefChanged(document.getElementById('mailnews.send_default_charset')); +} + +function PrefChanged(aPref) +{ + if (updatingPref) + return; + + var id = aPref.id.substr(9, 4) + "DefaultCharsetList"; + var menulist = document.getElementById(id); + if (!aPref.hasUserValue) + menulist.selectedIndex = 0; + else { + var bundle = document.getElementById("charsetBundle"); + menulist.value = bundle.getString(aPref.value.toLowerCase()); + } +} + +function UpdatePref(aMenulist) +{ + updatingPref = true; + var id = "mailnews." + aMenulist.id.substr(0, 4) + "_default_charset"; + var pref = document.getElementById(id); + if (aMenulist.selectedIndex) + pref.value = aMenulist.value; + else + pref.value = undefined; // reset to default + updatingPref = false; +} diff --git a/comm/suite/mailnews/components/prefs/content/pref-character_encoding.xul b/comm/suite/mailnews/components/prefs/content/pref-character_encoding.xul new file mode 100755 index 0000000000..009f5f49de --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-character_encoding.xul @@ -0,0 +1,111 @@ +<?xml version="1.0"?> + +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + +<?xml-stylesheet href="chrome://messenger/skin/prefPanels.css" type="text/css"?> + +<!DOCTYPE overlay [ + <!ENTITY % prefCharacterEncodingDTD SYSTEM "chrome://messenger/locale/pref-character_encoding.dtd"> %prefCharacterEncodingDTD; + <!ENTITY % prefUtilitiesDTD SYSTEM "chrome://communicator/locale/pref/prefutilities.dtd"> %prefUtilitiesDTD; +]> + +<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + <prefpane id="character_encoding_pane" + label="&pref.character.encoding2.title;" + script="chrome://messenger/content/pref-character_encoding.js"> + <preferences id="character_encoding_preferences"> + <preference id="mailnews.view_default_charset" + name="mailnews.view_default_charset" + type="wstring" + onchange="PrefChanged(this);"/> + <preference id="mail.strictly_mime" + name="mail.strictly_mime" + type="bool"/> + <preference id="mailnews.send_default_charset" + name="mailnews.send_default_charset" + type="wstring" + onchange="PrefChanged(this);"/> + <preference id="mailnews.reply_in_default_charset" + name="mailnews.reply_in_default_charset" + type="bool"/> + </preferences> + + <groupbox align="start"> + <caption label="&messageDisplay.caption;"/> + <hbox align="center"> + <label control="viewDefaultCharsetList" + value="&viewFallbackCharset2.label;" + accesskey="&viewFallbackCharset2.accesskey;"/> + <menulist id="viewDefaultCharsetList" + oncommand="UpdatePref(this);"> + <menupopup> + <menuitem label="&FallbackCharset.auto;" value=""/> + <menuitem label="&FallbackCharset.unicode;" value="UTF-8"/> + <menuitem label="&FallbackCharset.other;" value="windows-1252"/> + <menuseparator/> + <menuitem label="&FallbackCharset.arabic;" value="windows-1256"/> + <menuitem label="&FallbackCharset.baltic;" value="windows-1257"/> + <menuitem label="&FallbackCharset.ceiso;" value="ISO-8859-2"/> + <menuitem label="&FallbackCharset.cewindows;" value="windows-1250"/> + <menuitem label="&FallbackCharset.simplified;" value="gbk"/> + <menuitem label="&FallbackCharset.traditional;" value="Big5"/> + <menuitem label="&FallbackCharset.cyrillic;" value="windows-1251"/> + <menuitem label="&FallbackCharset.greek;" value="ISO-8859-7"/> + <menuitem label="&FallbackCharset.hebrew;" value="windows-1255"/> + <menuitem label="&FallbackCharset.japanese;" value="Shift_JIS"/> + <menuitem label="&FallbackCharset.korean;" value="EUC-KR"/> + <menuitem label="&FallbackCharset.thai;" value="windows-874"/> + <menuitem label="&FallbackCharset.turkish;" value="windows-1254"/> + <menuitem label="&FallbackCharset.vietnamese;" value="windows-1258"/> + </menupopup> + </menulist> + </hbox> + <description>&viewFallbackCharset.desc;</description> + </groupbox> + + <!-- Composing Mail --> + <groupbox align="start"> + <caption label="&composingMessages.caption;"/> + + <checkbox id="strictlyMime" + label="&useMIME.label;" + accesskey="&useMIME.accesskey;" + preference="mail.strictly_mime"/> + + <hbox align="center"> + <label value="&sendDefaultCharset2.label;" + accesskey="&sendDefaultCharset2.accesskey;" + control="sendDefaultCharsetList"/> + <menulist id="sendDefaultCharsetList" + oncommand="UpdatePref(this);"> + <menupopup> + <menuitem label="&FallbackCharset.auto;" value=""/> + <menuitem label="&FallbackCharset.unicode;" value="UTF-8"/> + <menuitem label="&FallbackCharset.other;" value="windows-1252"/> + <menuseparator/> + <menuitem label="&FallbackCharset.arabic;" value="windows-1256"/> + <menuitem label="&FallbackCharset.baltic;" value="windows-1257"/> + <menuitem label="&FallbackCharset.ceiso;" value="ISO-8859-2"/> + <menuitem label="&FallbackCharset.cewindows;" value="windows-1250"/> + <menuitem label="&FallbackCharset.simplified;" value="gbk"/> + <menuitem label="&FallbackCharset.traditional;" value="Big5"/> + <menuitem label="&FallbackCharset.cyrillic;" value="windows-1251"/> + <menuitem label="&FallbackCharset.greek;" value="ISO-8859-7"/> + <menuitem label="&FallbackCharset.hebrew;" value="windows-1255"/> + <menuitem label="&FallbackCharset.japanese;" value="Shift_JIS"/> + <menuitem label="&FallbackCharset.korean;" value="EUC-KR"/> + <menuitem label="&FallbackCharset.thai;" value="windows-874"/> + <menuitem label="&FallbackCharset.turkish;" value="windows-1254"/> + <menuitem label="&FallbackCharset.vietnamese;" value="windows-1258"/> + </menupopup> + </menulist> + </hbox> + <checkbox id="replyInDefaultCharset" + label="&replyInDefaultCharset3.label;" + accesskey="&replyInDefaultCharset3.accesskey;" + preference="mailnews.reply_in_default_charset"/> + </groupbox> + </prefpane> +</overlay> diff --git a/comm/suite/mailnews/components/prefs/content/pref-junk.js b/comm/suite/mailnews/components/prefs/content/pref-junk.js new file mode 100644 index 0000000000..9f31050c46 --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-junk.js @@ -0,0 +1,45 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +var { MailServices } = ChromeUtils.import( + "resource:///modules/MailServices.jsm" +); + +function Startup() +{ + UpdateDependentElement("manualMark", "manualMarkMode"); + UpdateDependentElement("enableJunkLogging", "openJunkLog"); +} + +function UpdateDependentElement(aBaseId, aDependentId) +{ + var pref = document.getElementById(aBaseId).getAttribute("preference"); + EnableElementById(aDependentId, document.getElementById(pref).value, false); +} + +function OpenJunkLog() +{ + window.openDialog("chrome://messenger/content/junkLog.xul", + "junkLog", + "chrome,modal,titlebar,resizable,centerscreen"); +} + +function ResetTrainingData() +{ + // make sure the user really wants to do this + var bundle = document.getElementById("bundleJunkPreferences"); + var title = bundle.getString("confirmResetJunkTrainingTitle"); + var text = bundle.getString("confirmResetJunkTrainingText"); + + // if the user says no, then just fall out + if (Services.prompt.confirmEx(window, title, text, + Services.prompt.STD_YES_NO_BUTTONS | + Services.prompt.BUTTON_POS_1_DEFAULT, + "", "", "", null, {})) + return; + + // otherwise go ahead and remove the training data + MailServices.junk.resetTrainingData(); +} diff --git a/comm/suite/mailnews/components/prefs/content/pref-junk.xul b/comm/suite/mailnews/components/prefs/content/pref-junk.xul new file mode 100644 index 0000000000..b6d1f4507d --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-junk.xul @@ -0,0 +1,134 @@ +<?xml version="1.0"?> + +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + +<?xml-stylesheet href="chrome://messenger/skin/prefPanels.css" type="text/css"?> + +<!DOCTYPE overlay [ +<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd"> +%brandDTD; +<!ENTITY % prefJunkDTD SYSTEM "chrome://messenger/locale/pref-junk.dtd"> +%prefJunkDTD; +]> + +<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + <prefpane id="junk_pane" + label="&pref.junk.title;" + script="chrome://messenger/content/pref-junk.js"> + <preferences id="junk_preferences"> + <preference id="mail.spam.manualMark" + name="mail.spam.manualMark" + type="bool" + onchange="EnableElementById('manualMarkMode', this.value, false);"/> + <preference id="mail.spam.manualMarkMode" + name="mail.spam.manualMarkMode" + type="int"/> + <preference id="mail.spam.markAsReadOnSpam" + name="mail.spam.markAsReadOnSpam" + type="bool"/> + <preference id="mailnews.ui.junk.manualMarkAsJunkMarksRead" + name="mailnews.ui.junk.manualMarkAsJunkMarksRead" + type="bool"/> + <preference id="mail.spam.logging.enabled" + name="mail.spam.logging.enabled" + type="bool" + onchange="EnableElementById('openJunkLog', this.value, false);"/> + <preference id="pref.junk.disable_button.openJunkLog" + name="pref.junk.disable_button.openJunkLog" + type="string"/> + <preference id="pref.junk.disable_button.resetTrainingData" + name="pref.junk.disable_button.resetTrainingData" + type="string"/> + <preference id="mail.phishing.detection.enabled" + name="mail.phishing.detection.enabled" + type="bool"/> + <preference id="mailnews.downloadToTempFile" + name="mailnews.downloadToTempFile" + type="bool"/> + </preferences> + + <stringbundleset id="junkBundleset"> + <stringbundle id="bundleJunkPreferences" + src="chrome://messenger/locale/messenger.properties"/> + </stringbundleset> + + <groupbox> + <caption label="&junkSettings.caption;"/> + <description>&junkMail.intro;</description> + <class separator="thin"/> + + <checkbox id="manualMark" + label="&manualMark.label;" + accesskey="&manualMark.accesskey;" + preference="mail.spam.manualMark"/> + <radiogroup id="manualMarkMode" + class="indent" + aria-labelledby="manualMark" + preference="mail.spam.manualMarkMode"> + <radio id="manualMarkMode0" + label="&manualMarkModeMove.label;" + accesskey="&manualMarkModeMove.accesskey;" + value="0"/> + <radio id="manualMarkMode1" + label="&manualMarkModeDelete.label;" + accesskey="&manualMarkModeDelete.accesskey;" + value="1"/> + </radiogroup> + + <separator class="thin"/> + + <description>&markAsRead.intro;</description> + <vbox class="indent"> + <checkbox id="autoMarkAsRead" + label="&autoMarkAsRead.label;" + accesskey="&autoMarkAsRead.accesskey;" + preference="mail.spam.markAsReadOnSpam"/> + <checkbox id="manualMarkAsRead" + label="&manualMarkAsRead.label;" + accesskey="&manualMarkAsRead.accesskey;" + preference="mailnews.ui.junk.manualMarkAsJunkMarksRead"/> + </vbox> + + <separator class="thin"/> + + <hbox align="start"> + <checkbox id="enableJunkLogging" + label="&enableJunkLogging.label;" + accesskey="&enableJunkLogging.accesskey;" + preference="mail.spam.logging.enabled"/> + <spacer flex="1"/> + <button id="openJunkLog" + label="&openJunkLog.label;" + accesskey="&openJunkLog.accesskey;" + preference="pref.junk.disable_button.openJunkLog" + oncommand="OpenJunkLog();"/> + </hbox> + <hbox align="start"> + <spacer flex="1"/> + <button id="resetTrainingData" + label="&resetTrainingData.label;" + accesskey="&resetTrainingData.accesskey;" + preference="pref.junk.disable_button.resetTrainingData" + oncommand="ResetTrainingData();"/> + </hbox> + </groupbox> + + <groupbox> + <caption label="&pref.suspectMail.caption;"/> + + <checkbox id="enablePhishingDetector" + label="&enablePhishingDetector.label;" + accesskey="&enablePhishingDetector.accesskey;" + preference="mail.phishing.detection.enabled"/> + + <separator class="thin"/> + + <checkbox id="enableAntiVirusQuarantine" + label="&antiVirus.label;" + accesskey="&antiVirus.accesskey;" + preference="mailnews.downloadToTempFile"/> + </groupbox> + </prefpane> +</overlay> diff --git a/comm/suite/mailnews/components/prefs/content/pref-mailnews.js b/comm/suite/mailnews/components/prefs/content/pref-mailnews.js new file mode 100644 index 0000000000..f057fb46ae --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-mailnews.js @@ -0,0 +1,25 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +function Startup() +{ + startPageCheck(); +} + +function startPageCheck() +{ + var checked = document.getElementById("mailnews.start_page.enabled").value; + var urlElement = document.getElementById("mailnewsStartPageUrl"); + var prefLocked = document.getElementById("mailnews.start_page.url").locked; + + urlElement.disabled = !checked || prefLocked; +} + +function setHomePageToDefaultPage() +{ + var startPagePref = document.getElementById("mailnews.start_page.url"); + + startPagePref.value = startPagePref.defaultValue; +} diff --git a/comm/suite/mailnews/components/prefs/content/pref-mailnews.xul b/comm/suite/mailnews/components/prefs/content/pref-mailnews.xul new file mode 100644 index 0000000000..e3fbeb12e8 --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-mailnews.xul @@ -0,0 +1,141 @@ +<?xml version="1.0"?> + +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + +<?xml-stylesheet href="chrome://messenger/skin/prefPanels.css" type="text/css"?> +<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?> + +<!DOCTYPE overlay [ +<!ENTITY % prefMailnewsDTD SYSTEM "chrome://messenger/locale/pref-mailnews.dtd"> +%prefMailnewsDTD; +]> + +<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + <prefpane id="mailnews_pane" + label="&pref.mailnews.title;" + script="chrome://messenger/content/pref-mailnews.js"> + + <preferences id="mailnews_preferences"> + <preference id="mailnews.confirm.moveFoldersToTrash" + name="mailnews.confirm.moveFoldersToTrash" type="bool"/> + <preference id="mailnews.remember_selected_message" + name="mailnews.remember_selected_message" type="bool"/> + <preference id="mailnews.thread_pane_column_unthreads" + name="mailnews.thread_pane_column_unthreads" + inverted="true" type="bool"/> + <preference id="mail.tabs.autoHide" + name="mail.tabs.autoHide" + type="bool"/> + <preference id="mail.tabs.loadInBackground" + name="mail.tabs.loadInBackground" + inverted="true" type="bool"/> + <preference id="mail.biff.on_new_window" + name="mail.biff.on_new_window" + type="bool" + inverted="true"/> + <preference id="mail.tabs.opentabfor.middleclick" + name="mail.tabs.opentabfor.middleclick" + type="bool"/> + <preference id="mail.tabs.opentabfor.doubleclick" + name="mail.tabs.opentabfor.doubleclick" + type="bool"/> + <preference id="mailnews.start_page.enabled" + onchange="this.parentNode.parentNode.startPageCheck();" + name="mailnews.start_page.enabled" type="bool"/> + <preference id="mailnews.start_page.url" + name="mailnews.start_page.url" type="wstring"/> + </preferences> + + <groupbox> + <caption label="&generalSettings.caption;"/> + + <hbox align="center"> + <checkbox id="mailnewsConfirmMoveFoldersToTrash" label="&confirmMove.label;" + preference="mailnews.confirm.moveFoldersToTrash" + accesskey="&confirmMove.accesskey;"/> + </hbox> + + <hbox align="center"> + <checkbox id="mailRememberLastMsg" label="&rememberLastMsg.label;" + preference="mailnews.remember_selected_message" + accesskey="&rememberLastMsg.accesskey;" /> + </hbox> + + <hbox align="center"> + <checkbox id="mailPreserveThreading" + label="&preserveThreading.label;" + accesskey="&preserveThreading.accesskey;" + preference="mailnews.thread_pane_column_unthreads"/> + </hbox> + + <hbox align="center"> + <checkbox id="mailAutoHide" + label="&mailAutoHide.label;" + accesskey="&mailAutoHide.accesskey;" + preference="mail.tabs.autoHide"/> + </hbox> + + <hbox align="center"> + <checkbox id="loadInBackground" + label="&loadInBackground.label;" + accesskey="&loadInBackground.accesskey;" + preference="mail.tabs.loadInBackground"/> + </hbox> + + <hbox align="center"> + <checkbox id="mailBiffOnNewWindow" + label="&mailBiffOnNewWindow.label;" + accesskey="&mailBiffOnNewWindow.accesskey;" + preference="mail.biff.on_new_window"/> + </hbox> + </groupbox> + + <groupbox id="mailOpenTabFor" align="start"> + <caption label="&mailOpenTabsFor.label;"/> + <hbox align="center"> + <checkbox id="mailMiddleClick" +#ifndef XP_MACOSX + label="&mailMiddleClick.label;" + accesskey="&mailMiddleClick.accesskey;" +#else + label="&mailMiddleClickMac.label;" + accesskey="&mailMiddleClickMac.accesskey;" +#endif + preference="mail.tabs.opentabfor.middleclick"/> + </hbox> + + <hbox align="center"> + <checkbox id="mailDoubleClick" + label="&mailDoubleClick.label;" + accesskey="&mailDoubleClick.accesskey;" + preference="mail.tabs.opentabfor.doubleclick"/> + </hbox> + </groupbox> + + <groupbox> + <caption label="&messengerStartPage.caption;"/> + <hbox align="center"> + <checkbox id="mailnewsStartPageEnabled" label="&enableStartPage.label;" + preference="mailnews.start_page.enabled" + accesskey="&enableStartPage.accesskey;"/> + </hbox> + + <hbox align="center"> + <label value="&location.label;" accesskey="&location.accesskey;" + control="mailnewsStartPageUrl"/> + <textbox id="mailnewsStartPageUrl" flex="1" type="autocomplete" + preference="mailnews.start_page.url" timeout="50" + autocompletesearch="history" maxrows="6" class="uri-element"/> + </hbox> + <hbox pack="end"> + <button label="&useDefault.label;" accesskey="&useDefault.accesskey;" + oncommand="setHomePageToDefaultPage();"> + <observes element="mailnewsStartPageUrl" attribute="disabled"/> + </button> + </hbox> + + </groupbox> + </prefpane> +</overlay> diff --git a/comm/suite/mailnews/components/prefs/content/pref-notifications.js b/comm/suite/mailnews/components/prefs/content/pref-notifications.js new file mode 100644 index 0000000000..89191e7cd6 --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-notifications.js @@ -0,0 +1,91 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// The contents of this file will be loaded into the scope of the object +// <prefpane id="notifications_pane">! + +var {AppConstants} = ChromeUtils.import( + "resource://gre/modules/AppConstants.jsm" +); + +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 Cc); + + // 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 macOS only + var newMailNotificationBouncePref = document.getElementById("newMailNotificationBounceBox"); + newMailNotificationBouncePref.hidden = AppConstants.platform != "macosx"; + + // show tray icon option currently available for Windows only + var newMailNotificationTrayIconPref = document.getElementById("newMailNotificationTrayIconBox"); + newMailNotificationTrayIconPref.hidden = AppConstants.platform != "win"; + + // use system alert option currently available for Linux only + var useSystemAlertPref = document.getElementById("useSystemAlertBox"); + useSystemAlertPref.hidden = AppConstants.platform != "linux"; + + EnableAlert(document.getElementById("mail.biff.show_alert").value, false); + EnableTrayIcon(document.getElementById("mail.biff.show_tray_icon").value); + + gSoundUrlPref = document.getElementById("mail.biff.play_sound.url"); + + PlaySoundCheck(document.getElementById("mail.biff.play_sound").value); +} + +function EnableAlert(aEnable, aFocus) +{ + // switch off the balloon on Windows if the user wants regular alerts + if (aEnable && AppConstants.platform == "win") { + let balloonAlert = document.getElementById("mail.biff.show_balloon"); + if (!balloonAlert.locked) + balloonAlert.value = false; + } + + EnableElementById("showAlertTime", aEnable, aFocus); + EnableElementById("showAlertPreviewText", aEnable, false); + EnableElementById("showAlertSubject", aEnable, false); + EnableElementById("showAlertSender", aEnable, false); + EnableElementById("useSystemAlertRadio", aEnable, false); +} + +function EnableTrayIcon(aEnable) +{ + EnableElementById("newMailNotificationBalloon", aEnable, false); +} + +function ClearAlert(aEnable) +{ + // switch off the regular alerts if the user wants the balloon + if (aEnable && AppConstants.platform == "win") { + let showAlert = document.getElementById("mail.biff.show_alert"); + if (!showAlert.locked) + showAlert.value = false; + } +} + +function PlaySoundCheck(aPlaySound) +{ + let playSoundType = document.getElementById("mail.biff.play_sound.type").value; + + EnableElementById("newMailNotificationType", aPlaySound, false); + EnableSoundURL(aPlaySound && (playSoundType == 1)); +} + +function EnableSoundURL(aEnable) +{ + EnableElementById("mailnewsSoundFileUrl", aEnable, false); +} diff --git a/comm/suite/mailnews/components/prefs/content/pref-notifications.xul b/comm/suite/mailnews/components/prefs/content/pref-notifications.xul new file mode 100644 index 0000000000..20ac974050 --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-notifications.xul @@ -0,0 +1,187 @@ +<?xml version="1.0"?> + +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + +<?xml-stylesheet href="chrome://messenger/skin/prefPanels.css" type="text/css"?> + +<!DOCTYPE overlay [ +<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd"> +%brandDTD; +<!ENTITY % prefNotificationsDTD SYSTEM "chrome://messenger/locale/pref-notifications.dtd"> +%prefNotificationsDTD; +]> + +<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + <prefpane id="notifications_pane" + label="&pref.notifications.title;" + script="chrome://messenger/content/pref-notifications.js"> + + <preferences id="notifications_preferences"> + <preference id="mail.biff.show_alert" + name="mail.biff.show_alert" + type="bool" + onchange="EnableAlert(this.value, this.value);"/> + <preference id="alerts.totalOpenTime" + name="alerts.totalOpenTime" + type="int"/> + <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.use_system_alert" + name="mail.biff.use_system_alert" + type="bool"/> + <preference id="mail.biff.show_tray_icon" + name="mail.biff.show_tray_icon" + type="bool" + onchange="EnableTrayIcon(this.value);"/> + <preference id="mail.biff.show_balloon" + name="mail.biff.show_balloon" + type="bool" + onchange="ClearAlert(this.value);"/> + <preference id="mail.biff.animate_dock_icon" + name="mail.biff.animate_dock_icon" + type="bool"/> + <preference id="mail.biff.play_sound" + name="mail.biff.play_sound" + type="bool" + onchange="PlaySoundCheck(this.value);"/> + <preference id="mail.biff.play_sound.type" + name="mail.biff.play_sound.type" + type="int" + onchange="EnableSoundURL(this.value == 1);"/> + <preference id="mail.biff.play_sound.url" + name="mail.biff.play_sound.url" + type="string"/> + </preferences> + + <groupbox id="newMessagesArrivePrefs"> + <caption label="¬ifications.caption;"/> + + <label value="&newMessagesArrive.label;"/> + <vbox id="newMailNotificationAlertBox"> + <hbox align="center"> + <checkbox id="newMailNotificationAlert" + label="&showAlertFor.label;" + accesskey="&showAlertFor.accesskey;" + preference="mail.biff.show_alert"/> + <textbox id="showAlertTime" + type="number" + size="3" + min="1" + max="3600" + preference="alerts.totalOpenTime" + onsyncfrompreference="return document.getElementById(this.getAttribute('preference')).value / 1000;" + onsynctopreference="return this.value * 1000;" + aria-labelledby="newMailNotificationAlert showAlertTime showAlertTimeEnd"/> + <label id="showAlertTimeEnd" + value="&showAlertTimeEnd.label;"> + <observes element="newMailNotificationAlert" + attribute="disabled"/> + </label> + </hbox> + <vbox id="showAlertOptionsBox" + class="indent"> + <checkbox id="showAlertPreviewText" + label="&showAlertPreviewText.label;" + accesskey="&showAlertPreviewText.accesskey;" + preference="mail.biff.alert.show_preview"/> + <checkbox id="showAlertSubject" + label="&showAlertSubject.label;" + accesskey="&showAlertSubject.accesskey;" + preference="mail.biff.alert.show_subject"/> + <checkbox id="showAlertSender" + label="&showAlertSender.label;" + accesskey="&showAlertSender.accesskey;" + preference="mail.biff.alert.show_sender"/> + <separator id="newMailNotificationAlertSeparator" + class="thin"/> + <vbox id="useSystemAlertBox"> + <radiogroup id="useSystemAlertRadio" + preference="mail.biff.use_system_alert"> + <radio id="useSystemAlert" + value="true" + label="&useSystemAlert.label;" + accesskey="&useSystemAlert.accesskey;"/> + <radio id="useBuiltInAlert" + value="false" + label="&useBuiltInAlert.label;" + accesskey="&useBuiltInAlert.accesskey;"/> + </radiogroup> + <separator id="useSystemAlertSeparator" + class="thin"/> + </vbox> + </vbox> + </vbox> + <vbox id="newMailNotificationTrayIconBox"> + <checkbox id="newMailNotificationTrayIcon" + label="&showTrayIcon.label;" + accesskey="&showTrayIcon.accesskey;" + preference="mail.biff.show_tray_icon"/> + <checkbox id="newMailNotificationBalloon" + class="indent" + label="&showBalloon.label;" + accesskey="&showBalloon.accesskey;" + preference="mail.biff.show_balloon"/> + <separator id="newMailNotificationTrayIconSeparator" + class="thin"/> + </vbox> + <vbox id="newMailNotificationBounceBox"> + <checkbox id="newMailNotificationBounce" + label="&bounceSystemDockIcon.label;" + accesskey="&bounceSystemDockIcon.accesskey;" + preference="mail.biff.animate_dock_icon"/> + <separator id="newMailNotificationBounceSeparator" + class="thin"/> + </vbox> + <checkbox id="newMailNotification" + label="&playSound.label;" + accesskey="&playSound.accesskey;" + preference="mail.biff.play_sound"/> + <radiogroup id="newMailNotificationType" + preference="mail.biff.play_sound.type" + class="indent" + aria-labelledby="newMailNotification"> + <radio id="system" + value="0" + label="&systemsound.label;" + accesskey="&systemsound.accesskey;"/> + <radio id="custom" + value="1" + label="&customsound.label;" + accesskey="&customsound.accesskey;"/> + </radiogroup> + + <hbox align="center" class="indent"> + <filefield id="mailnewsSoundFileUrl" + flex="1" + preference="mail.biff.play_sound.url" + preference-editable="true" + onsyncfrompreference="return WriteSoundField(this, document.getElementById('notifications_pane').gSoundUrlPref.value);" + aria-labelledby="custom"/> + <hbox align="center"> + <button id="browse" + label="&browse.label;" + filepickertitle="&browse.title;" + accesskey="&browse.accesskey;" + oncommand="SelectSound(gSoundUrlPref);"> + <observes element="mailnewsSoundFileUrl" attribute="disabled"/> + </button> + <button id="playButton" + label="&playButton.label;" + accesskey="&playButton.accesskey;" + oncommand="PlaySound(gSoundUrlPref.value, true);"> + <observes element="mailnewsSoundFileUrl" attribute="disabled"/> + </button> + </hbox> + </hbox> + </groupbox> + </prefpane> +</overlay> diff --git a/comm/suite/mailnews/components/prefs/content/pref-offline.js b/comm/suite/mailnews/components/prefs/content/pref-offline.js new file mode 100644 index 0000000000..d453c8f97a --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-offline.js @@ -0,0 +1,19 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// The contents of this file will be loaded into the scope of the object +// <prefpane id="offline_pane">! + +function Startup() +{ + var value = document.getElementById("mail.prompt_purge_threshhold").value; + EnableElementById("offlineCompactFolderMin", value, false); +} + +function EnableMailPurgeThreshold(aValue) +{ + var focus = (document.getElementById("offlineCompactFolder") == document.commandDispatcher.focusedElement); + EnableElementById("offlineCompactFolderMin", aValue, focus); +} diff --git a/comm/suite/mailnews/components/prefs/content/pref-offline.xul b/comm/suite/mailnews/components/prefs/content/pref-offline.xul new file mode 100644 index 0000000000..49e4288ab0 --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-offline.xul @@ -0,0 +1,121 @@ +<?xml version="1.0"?> + +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + +<?xml-stylesheet href="chrome://messenger/skin/prefPanels.css" type="text/css"?> + +<!DOCTYPE overlay SYSTEM "chrome://messenger/locale/pref-offline.dtd"> + +<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + <prefpane id="offline_pane" + label="&pref.network.title;" + script="chrome://messenger/content/pref-offline.js"> + + <preferences id="offline_preferences"> + <preference id="offline.startup_state" + name="offline.startup_state" + type="int"/> + <preference id="offline.send.unsent_messages" + name="offline.send.unsent_messages" + type="int"/> + <preference id="offline.download.download_messages" + name="offline.download.download_messages" + type="int"/> + <preference id="mailnews.tcptimeout" + name="mailnews.tcptimeout" + type="int"/> + <preference id="mail.prompt_purge_threshhold" + name="mail.prompt_purge_threshhold" + type="bool" + onchange="EnableMailPurgeThreshold(this.value);"/> + <preference id="mail.purge_threshhold_mb" + name="mail.purge_threshhold_mb" + type="int"/> + </preferences> + + <groupbox> + <caption label="&pref.offline.caption;"/> + + <hbox align="center"> + <label value="&textStartUp;" control="whenStartingUp" + accesskey="&textStartUp.accesskey;"/> + <menulist id="whenStartingUp" preference="offline.startup_state"> + <menupopup> + <menuitem value="0" label="&menuitemRememberPrevState;"/> + <menuitem value="1" label="&menuitemAskMe;"/> + <menuitem value="2" label="&menuitemAlwaysOnline;"/> + <menuitem value="3" label="&menuitemAlwaysOffline;"/> + <menuitem value="4" label="&menuitemAutomatic;"/> + </menupopup> + </menulist> + </hbox> + + <separator/> + + <label value="&textGoingOnline;" control="whengoingOnlinestate"/> + <radiogroup id="whengoingOnlinestate" + orient="horizontal" class="indent" + preference="offline.send.unsent_messages"> + <radio value="1" label="&radioAutoSend;" + accesskey="&radioAutoSend.accesskey;"/> + <radio value="2" label="&radioNotSend;" + accesskey="&radioNotSend.accesskey;"/> + <radio value="0" label="&radioAskUnsent;" + accesskey="&radioAskUnsent.accesskey;"/> + </radiogroup> + + <separator/> + + <label value="&textGoingOffline;" control="whengoingOfflinestate"/> + <radiogroup id="whengoingOfflinestate" + orient="horizontal" class="indent" + preference="offline.download.download_messages"> + <radio value="1" label="&radioAutoDownload;" + accesskey="&radioAutoDownload.accesskey;"/> + <radio value="2" label="&radioNotDownload;" + accesskey="&radioNotDownload.accesskey;"/> + <radio value="0" label="&radioAskDownload;" + accesskey="&radioAskDownload.accesskey;"/> + </radiogroup> + </groupbox> + + <groupbox> + <caption label="&mailConnections.caption;"/> + <hbox align="center"> + <label id="timeoutLabel" + value="&mailnewsTimeout.label;" + accesskey="&mailnewsTimeout.accesskey;" + control="mailnewsTimeoutSeconds"/> + <textbox id="mailnewsTimeoutSeconds" + type="number" + size="4" + preference="mailnews.tcptimeout" + aria-labelledby="timeoutLabel mailnewsTimeoutSeconds timeoutSeconds"/> + <label id="timeoutSeconds" value="&mailnewsTimeoutSeconds.label;"/> + </hbox> + </groupbox> + + <groupbox> + <caption label="&Diskspace;"/> + <hbox align="center"> + <checkbox id="offlineCompactFolder" + label="&offlineCompactFolders.label;" + accesskey="&offlineCompactFolders.accesskey;" + preference="mail.prompt_purge_threshhold" + aria-labelledby="offlineCompactFolder offlineCompactFolderMin offlineCompactFolderMB"/> + <textbox id="offlineCompactFolderMin" + type="number" + size="4" + min="1" + max="2048" + increment="10" + value="20" + preference="mail.purge_threshhold_mb" + aria-labelledby="offlineCompactFolder offlineCompactFolderMin offlineCompactFolderMB"/> + <label id="offlineCompactFolderMB" value="&offlineCompactFoldersMB.label;"/> + </hbox> + </groupbox> + </prefpane> +</overlay> diff --git a/comm/suite/mailnews/components/prefs/content/pref-receipts.js b/comm/suite/mailnews/components/prefs/content/pref-receipts.js new file mode 100644 index 0000000000..7a85ac1a1f --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-receipts.js @@ -0,0 +1,28 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +var gNotInToCcLabel; +var gOutsideDomainLabel; +var gOtherCasesLabel; + +function Startup() +{ + gNotInToCcLabel = document.getElementById("notInToCcLabel"); + gOutsideDomainLabel = document.getElementById("outsideDomainLabel"); + gOtherCasesLabel = document.getElementById("otherCasesLabel"); + + var value = document.getElementById("mail.mdn.report.enabled").value; + EnableDisableAllowedReceipts(value); +} + +function EnableDisableAllowedReceipts(aEnable) +{ + EnableElementById("notInToCcPref", aEnable, false); + EnableElementById("outsideDomainPref", aEnable, false); + EnableElementById("otherCasesPref", aEnable, false); + gNotInToCcLabel.disabled = !aEnable; + gOutsideDomainLabel.disabled = !aEnable; + gOtherCasesLabel.disabled = !aEnable; +} diff --git a/comm/suite/mailnews/components/prefs/content/pref-receipts.xul b/comm/suite/mailnews/components/prefs/content/pref-receipts.xul new file mode 100644 index 0000000000..0ca17a02ed --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-receipts.xul @@ -0,0 +1,146 @@ +<?xml version="1.0"?> + +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + + +<?xml-stylesheet href="chrome://messenger/skin/prefPanels.css" type="text/css"?> + +<!DOCTYPE overlay SYSTEM "chrome://messenger/locale/pref-receipts.dtd"> + +<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + <prefpane id="receipts_pane" + label="&pref.receipts.title;" + script="chrome://messenger/content/pref-receipts.js"> + <preferences id="receipts_preferences"> + <preference id="mail.receipt.request_return_receipt_on" + name="mail.receipt.request_return_receipt_on" + type="bool"/> + <preference id="mail.incorporate.return_receipt" + name="mail.incorporate.return_receipt" + type="int"/> + <preference id="mail.mdn.report.enabled" + name="mail.mdn.report.enabled" + type="bool" + onchange="EnableDisableAllowedReceipts(this.value);"/> + <preference id="mail.mdn.report.not_in_to_cc" + name="mail.mdn.report.not_in_to_cc" + type="int"/> + <preference id="mail.mdn.report.outside_domain" + name="mail.mdn.report.outside_domain" + type="int"/> + <preference id="mail.mdn.report.other" + name="mail.mdn.report.other" + type="int"/> + </preferences> + + <groupbox> + <caption label="&prefReceipts.caption;"/> + + <vbox id="returnReceiptSettings" align="start"> + <checkbox id="alwaysRequest" + label="&requestReceipt.label;" + accesskey="&requestReceipt.accesskey;" + preference="mail.receipt.request_return_receipt_on"/> + + <separator/> + + <vbox id="receiptArrive"> + <label control="receiptFolder">&receiptArrive.label;</label> + <radiogroup id="receiptFolder" + class="indent" + preference="mail.incorporate.return_receipt"> + <radio value="0" + label="&leaveIt.label;" + accesskey="&leaveIt.accesskey;"/> + <radio value="1" + label="&moveToSent.label;" + accesskey="&moveToSent.accesskey;"/> + </radiogroup> + </vbox> + + <separator/> + + <vbox id="receiptRequest"> + <label control="receiptSend">&requestMDN.label;</label> + <radiogroup id="receiptSend" + class="indent" + preference="mail.mdn.report.enabled"> + <radio value="false" + label="&never.label;" + accesskey="&never.accesskey;"/> + <radio value="true" + label="&returnSome.label;" + accesskey="&returnSome.accesskey;"/> + + <hbox id="receiptSendIf" class="indent"> + <grid> + <columns> + <column/> + <column/> + </columns> + <rows> + <row align="center"> + <label id="notInToCcLabel" + accesskey="¬InToCc.accesskey;" + control="notInToCcPref" + value="¬InToCc.label;"/> + <menulist id="notInToCcPref" + preference="mail.mdn.report.not_in_to_cc"> + <menupopup> + <menuitem value="0" + label="&neverSend.label;"/> + <menuitem value="1" + label="&alwaysSend.label;"/> + <menuitem value="2" + label="&askMe.label;"/> + </menupopup> + </menulist> + </row> + <row align="center"> + <label id="outsideDomainLabel" + accesskey="&outsideDomain.accesskey;" + control="outsideDomainPref" + value="&outsideDomain.label;"/> + <menulist id="outsideDomainPref" + preference="mail.mdn.report.outside_domain"> + <menupopup> + <menuitem value="0" + label="&neverSend.label;"/> + <menuitem value="1" + label="&alwaysSend.label;"/> + <menuitem value="2" + label="&askMe.label;"/> + </menupopup> + </menulist> + </row> + <row align="center"> + <label id="otherCasesLabel" + accesskey="&otherCases.accesskey;" + control="otherCasesPref" + value="&otherCases.label;"/> + <menulist id="otherCasesPref" + preference="mail.mdn.report.other"> + <menupopup> + <menuitem value="0" + label="&neverSend.label;"/> + <menuitem value="1" + label="&alwaysSend.label;"/> + <menuitem value="2" + label="&askMe.label;"/> + </menupopup> + </menulist> + </row> + </rows> + </grid> + </hbox> + </radiogroup> + + </vbox> + + </vbox> + + </groupbox> + </prefpane> +</overlay> diff --git a/comm/suite/mailnews/components/prefs/content/pref-tags.js b/comm/suite/mailnews/components/prefs/content/pref-tags.js new file mode 100644 index 0000000000..8182fe7237 --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-tags.js @@ -0,0 +1,478 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +var { MailServices } = ChromeUtils.import( + "resource:///modules/MailServices.jsm" +); + +// Each tag entry in our list looks like this: +// <listitem> +// <listcell> +// <textbox/> +// </listcell> +// <listcell> +// <colorpicker type='button'/> +// </listcell> +// </listitem> +// For ease of handling, all tag data is stored in <listitem>.tagInfo also. + +const kOrdinalCharLow = "a"; +const kOrdinalCharHigh = "z"; +const kOrdinalPadding = String.fromCharCode(kOrdinalCharLow.charCodeAt(0) - 1); + +var gInstantApply = document.documentElement.instantApply; // read only once +var gTagList = null; // tagList root element +var gAddButton = null; +var gDeleteButton = null; +var gRaiseButton = null; +var gLowerButton = null; + +var gDeletedTags = {}; // tags marked for deletion in non-instant apply mode + + +function Startup() +{ + gTagList = document.getElementById('tagList'); + gAddButton = document.getElementById('addTagButton'); + gDeleteButton = document.getElementById('deleteTagButton'); + gRaiseButton = document.getElementById('raiseTagButton'); + gLowerButton = document.getElementById('lowerTagButton'); + InitTagList(); + if (!gInstantApply) + window.addEventListener("dialogaccept", this.OnOK, true); + UpdateButtonStates(); +} + +function InitTagList() +{ + // Read the tags from preferences via the tag service. + var tagArray = MailServices.tags.getAllTags(); + for (var i = 0; i < tagArray.length; ++i) + { + var t = tagArray[i]; + var tagInfo = {tag: t.tag, + key: t.key, + color: t.color, + ordinal: t.ordinal, + new: false, // not added in this run + changed: false}; // not changed (yet) + AppendTagEntry(tagInfo, null); + } +} + +// read text and color from the listitem +function UpdateTagInfo(aTagInfo, aEntry) +{ + var tag = aEntry.firstChild.firstChild.value; + var color = aEntry.lastChild.lastChild.color; + if (tag != aTagInfo.tag || color != aTagInfo.color) + { + aTagInfo.changed = true; // never unset changed flag here! + aTagInfo.tag = tag; + aTagInfo.color = color; + } +} + +// set text and color of the listitem +function UpdateTagEntry(aTagInfo, aEntry) +{ + aEntry.firstChild.firstChild.value = aTagInfo.tag; + aEntry.lastChild.lastChild.color = aTagInfo.color || 'inherit'; +} + +function AppendTagEntry(aTagInfo, aRefChild) +{ + // Creating a colorpicker dynamically in an onload handler is really sucky. + // You MUST first set its type attribute (to select the correct binding), then + // add the element to the DOM (to bind the binding) and finally set the color + // property(!) afterwards. Try in any other order and fail... :-( + var tagCell = document.createElement('listcell'); + var textbox = document.createElement('textbox'); + textbox.setAttribute('flex', 1); + textbox.setAttribute('value', aTagInfo.tag); + tagCell.appendChild(textbox); + + var colorCell = document.createElement('listcell'); + var colorpicker = document.createElement('colorpicker'); + colorpicker.setAttribute('type', 'button'); + colorpicker.setAttribute('color', aTagInfo.color || 'inherit') + colorCell.appendChild(colorpicker); + + var entry = document.createElement('listitem'); + entry.addEventListener('focus', OnFocus, true); + entry.addEventListener('change', OnChange); + entry.setAttribute('allowevents', 'true'); // activate textbox and colorpicker + entry.tagInfo = aTagInfo; + entry.appendChild(tagCell); + entry.appendChild(colorCell); + + gTagList.insertBefore(entry, aRefChild); + return entry; +} + +function OnFocus(aEvent) +{ + gTagList.selectedItem = this; + UpdateButtonStates(); +} + +function FocusTagEntry(aEntry) +{ + // focus the entry's textbox + gTagList.ensureElementIsVisible(aEntry); + aEntry.firstChild.firstChild.focus(); +} + +function GetTagOrdinal(aTagInfo) +{ + if (aTagInfo.ordinal) + return aTagInfo.ordinal; + return aTagInfo.key; +} + +function SetTagOrdinal(aTagInfo, aOrdinal) +{ + var ordinal = aTagInfo.ordinal; + aTagInfo.ordinal = (aTagInfo.key != aOrdinal) ? aOrdinal : ''; + if (aTagInfo.ordinal != ordinal) + aTagInfo.changed = true; +} + +function BisectString(aPrev, aNext) +{ + // find a string which is lexically greater than aPrev and lesser than aNext: + // - copy leading parts common to aPrev and aNext into the result + // - find the first position where aPrev and aNext differ: + // - if we can squeeze a character in between there: fine, done! + // - if not: + // - if the rest of aNext is longer than one character, we can squeeze + // in just the first aNext rest-character and be done! + // - else we try to "increment" aPrev a bit to fit in + if ((aPrev >= aNext) || (aPrev + kOrdinalCharLow >= aNext)) + return ''; // no such string exists + + // pad the shorter string + var lenPrev = aPrev.length; + var lenNext = aNext.length; + var lenMax = Math.max(lenPrev, lenNext); + + // loop over both strings at once, padding if necessary + var constructing = false; + var result = ''; + for (var i = 0; i < lenMax; ++i) + { + var prevChar = (i < lenPrev) ? aPrev[i] : kOrdinalPadding; + var nextChar = constructing ? kOrdinalCharHigh + : (i < lenNext) ? aNext[i] + : kOrdinalPadding; + var prevCode = prevChar.charCodeAt(0); + var nextCode = nextChar.charCodeAt(0); + if (prevCode == nextCode) + { + // copy common characters + result += prevChar; + } + else if (prevCode + 1 < nextCode) + { + // found a real bisecting string + result += String.fromCharCode((prevCode + nextCode) / 2); + return result; + } + else + { + // nextCode is greater than prevCode, but there's no place in between. + // But if aNext[i+1] exists, then nextChar will suffice and we're done! + // ("x" < "xsomething") + if (i + 1 < lenNext) + { + // found a real bisecting string + return result + nextChar; + } + // just copy over prevChar and enter construction mode + result += prevChar; + constructing = true; + } + } + return ''; // nothing found +} + +function RecalculateOrdinal(aEntry) +{ + // Calculate a new ordinal for the given entry, assuming that both its + // predecessor's and successor's are correct, i.e. ord(p) < ord(s)! + var tagInfo = aEntry.tagInfo; + var ordinal = tagInfo.key; + // get neighbouring ordinals + var prevOrdinal = '', nextOrdinal = ''; + var prev = aEntry.previousSibling; + if (prev && prev.nodeName == 'listitem') // first.prev == listhead + prevOrdinal = GetTagOrdinal(prev.tagInfo); + var next = aEntry.nextSibling; + if (next) + { + nextOrdinal = GetTagOrdinal(next.tagInfo); + } + else + { + // ensure key < nextOrdinal if entry is the last/only entry + nextOrdinal = prevOrdinal || ordinal; + nextOrdinal = String.fromCharCode(nextOrdinal.charCodeAt(0) + 2); + } + + if (prevOrdinal < ordinal && ordinal < nextOrdinal) + { + // no ordinal needed, just clear it + SetTagOrdinal(tagInfo, '') + return; + } + + // so we need a new ordinal, because key <= prevOrdinal or key >= nextOrdinal + ordinal = BisectString(prevOrdinal, nextOrdinal); + if (ordinal) + { + // found a new ordinal + SetTagOrdinal(tagInfo, ordinal) + return; + } + + // couldn't find an ordinal before the nextOrdinal, so take that instead + // and recalculate a new one for the next entry + SetTagOrdinal(tagInfo, nextOrdinal); + if (next) + ApplyChange(next); +} + +function OnChange(aEvent) +{ + ApplyChange(aEvent.currentTarget); +} + +function ApplyChange(aEntry) +{ + if (!aEntry) + { + dump('ApplyChange: aEntry is null! (called by ' + ApplyChange.caller.name + ')\n'); + return; + } + + // the tag data got changed, so write it back to the system + var tagInfo = aEntry.tagInfo; + UpdateTagInfo(tagInfo, aEntry); + // ensure unique tag name + var dupeList = ReadTagListFromUI(aEntry); + var uniqueTag = DisambiguateTag(tagInfo.tag, dupeList); + if (tagInfo.tag != uniqueTag) + { + tagInfo.tag = uniqueTag; + tagInfo.changed = true; + UpdateTagEntry(tagInfo, aEntry); + } + + if (gInstantApply) + { + // If the item was newly added, we still can rename the key, + // so that it's in sync with the actual tag. + if (tagInfo.new && tagInfo.key) + { + // Do not clear the "new" flag! + // The key will only stick after closing the dialog. + MailServices.tags.deleteKey(tagInfo.key); + tagInfo.key = ''; + } + if (!tagInfo.key) + { + // create a new key, based upon the new tag + MailServices.tags.addTag(tagInfo.tag, '', ''); + tagInfo.key = MailServices.tags.getKeyForTag(tagInfo.tag); + } + + // Recalculate the sort ordinal, if necessary. + // We assume that the neighbour's ordinals are correct, + // i.e. that ordinal(pos - 1) < ordinal(pos + 1)! + RecalculateOrdinal(aEntry); + WriteTag(tagInfo); + } +} + +function WriteTag(aTagInfo) +{ +//dump('********** WriteTag: ' + aTagInfo.toSource() + '\n'); + try + { + MailServices.tags.addTagForKey(aTagInfo.key, aTagInfo.tag, aTagInfo.color, + aTagInfo.ordinal); + aTagInfo.changed = false; + } + catch (e) + { + dump('WriteTag: update exception:\n' + e); + } +} + +function UpdateButtonStates() +{ + var entry = gTagList.selectedItem; + // disable Delete if no selection + gDeleteButton.disabled = !entry; + // disable Raise if no selection or first entry + gRaiseButton.disabled = !entry || !gTagList.getPreviousItem(entry, 1); + // disable Lower if no selection or last entry + gLowerButton.disabled = !entry || !gTagList.getNextItem(entry, 1); +} + +function ReadTagListFromUI(aIgnoreEntry) +{ + // reads distinct tag names from the UI + var dupeList = {}; // indexed by tag + for (var entry = gTagList.firstChild; entry; entry = entry.nextSibling) + if ((entry != aIgnoreEntry) && (entry.localName == 'listitem')) + dupeList[entry.firstChild.firstChild.value] = true; + return dupeList; +} + +function DisambiguateTag(aTag, aTagList) +{ + if (aTag in aTagList) + { + var suffix = 2; + while (aTag + ' ' + suffix in aTagList) + ++suffix; + aTag += ' ' + suffix; + } + return aTag; +} + +function AddTag() +{ + // Add a new tag to the UI here. + // It will be be written to the preference system + // (a) directly on each change for instant apply, or + // (b) only if the dialogaccept handler is executed. + + // create new unique tag name + var dupeList = ReadTagListFromUI(); + var tag = DisambiguateTag(gAddButton.getAttribute('defaulttagname'), dupeList); + + // create new tag list entry + var tagInfo = {tag: tag, + key: '', + color: 'inherit', + ordinal: '', + new: true, + changed: true}; + var refChild = gTagList.getNextItem(gTagList.selectedItem, 1); + var newEntry = AppendTagEntry(tagInfo, refChild); + ApplyChange(newEntry); + FocusTagEntry(newEntry); +} + +function DeleteTag() +{ + // Delete the selected tag from the UI here. If it was added during this + // preference dialog session, we can drop it at once; if it was read from + // the preferences system, we may need to remember killing it in OnOK. + var entry = gTagList.selectedItem; + var key = entry.tagInfo.key; + if (key) + { + if (gInstantApply) + MailServices.tags.deleteKey(key); + else + gDeletedTags[key] = true; // dummy value + } + // after removing, move focus to next entry, if it exist, else try previous + var newFocusItem = gTagList.getNextItem(entry, 1) || + gTagList.getPreviousItem(entry, 1); + gTagList.removeItemAt(gTagList.getIndexOfItem(entry)); + if (newFocusItem) + FocusTagEntry(newFocusItem); + else + UpdateButtonStates(); +} + +function MoveTag(aMoveUp) +{ + // Move the selected tag one position up or down in the tagList's child order. + // This reordering may require changing ordinal strings. + var entry = gTagList.selectedItem; + var tagInfo = entry.tagInfo; + UpdateTagInfo(tagInfo, entry); // remember changed values + var successor = aMoveUp ? gTagList.getPreviousItem(entry, 1) + : gTagList.getNextItem(entry, 2); + entry.parentNode.insertBefore(entry, successor); + FocusTagEntry(entry); + tagInfo.changed = true; + UpdateTagEntry(tagInfo, entry); // needs to be visible + ApplyChange(entry); +} + +function Restore() +{ + // clear pref panel tag list + // Remember any known keys for deletion in the OKHandler. + while (gTagList.getRowCount()) + { + var key = gTagList.removeItemAt(0).tagInfo.key; + if (key) + { + if (gInstantApply) + MailServices.tags.deleteKey(key); + else + gDeletedTags[key] = true; // dummy value + } + } + // add default items (no ordinal strings for those) + for (var i = 1; i <= 5; ++i) + { + // create default tags from the former label defaults + var key = "$label" + i; + var tag = GetLocalizedStringPref("mailnews.labels.description." + i); + var color = Services.prefs.getDefaultBranch("mailnews.labels.color.").getCharPref(i); + var tagInfo = {tag: tag, + key: key, + color: color, + ordinal: '', + new: false, + changed: true}; + var newEntry = AppendTagEntry(tagInfo, null); + ApplyChange(newEntry); + } + FocusTagEntry(gTagList.getItemAtIndex(0)); +} + +function OnOK() +{ + // remove all deleted tags from the preferences system + for (var key in gDeletedTags) + MailServices.tags.deleteKey(key); + + // Write tags to the preferences system, creating keys and ordinal strings. + for (var entry = gTagList.firstChild; entry; entry = entry.nextSibling) + { + if (entry.localName == 'listitem') + { + // only write listitems which have changed (this includes new ones) + var tagInfo = entry.tagInfo; + if (tagInfo.changed) + { + if (!tagInfo.key) + { + // newly added tag, need to create a key and read it + MailServices.tags.addTag(tagInfo.tag, '', ''); + tagInfo.key = MailServices.tags.getKeyForTag(tagInfo.tag); + } + if (tagInfo.key) + { + // Recalculate the sort ordinal, if necessary. + // We assume that the neighbour's ordinals are correct, + // i.e. that ordinal(pos - 1) < ordinal(pos + 1)! + RecalculateOrdinal(entry); + // update the tag definition + WriteTag(tagInfo); + } + } + } + } +} diff --git a/comm/suite/mailnews/components/prefs/content/pref-tags.xul b/comm/suite/mailnews/components/prefs/content/pref-tags.xul new file mode 100644 index 0000000000..cd99824a25 --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-tags.xul @@ -0,0 +1,83 @@ +<?xml version="1.0"?> + +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + +<?xml-stylesheet href="chrome://messenger/skin/prefPanels.css" type="text/css"?> + +<!DOCTYPE page SYSTEM "chrome://messenger/locale/pref-tags.dtd"> + +<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + <prefpane id="tags_pane" + label="&pref.tags.title;" + script="chrome://messenger/content/pref-tags.js"> + + <preferences id="tags_preferences"> + <preference id="pref.tags.disable_button.add" + name="pref.tags.disable_button.add" + type="bool"/> + <preference id="pref.tags.disable_button.delete" + name="pref.tags.disable_button.delete" + type="bool"/> + <preference id="pref.tags.disable_button.lower" + name="pref.tags.disable_button.lower" + type="bool"/> + <preference id="pref.tags.disable_button.raise" + name="pref.tags.disable_button.raise" + type="bool"/> + <preference id="pref.tags.disable_button.restore" + name="pref.tags.disable_button.restore" + type="bool"/> + </preferences> + + <groupbox flex="1"> + <caption label="&pref.tags.caption;"/> + <label control="tagList">&pref.tags.description;</label> + <hbox flex="1"> + <listbox id="tagList" flex="1" onselect="UpdateButtonStates();"> + <listcols> + <listcol flex="1"/> + <listcol/> + </listcols> + <listhead> + <listheader label="&tagColumn.label;"/> + <listheader label="&colorColumn.label;"/> + </listhead> + </listbox> + + <vbox> + <button id="addTagButton" + label="&addTagButton.label;" + accesskey="&addTagButton.accesskey;" + defaulttagname="&defaultTagName.label;" + preference="pref.tags.disable_button.add" + oncommand="AddTag();"/> + <button id="deleteTagButton" + label="&deleteTagButton.label;" + accesskey="&deleteTagButton.accesskey;" + preference="pref.tags.disable_button.delete" + oncommand="DeleteTag();"/> + <spacer flex="1"/> + <button id="raiseTagButton" + label="&raiseTagButton.label;" + accesskey="&raiseTagButton.accesskey;" + preference="pref.tags.disable_button.raise" + oncommand="MoveTag(true);"/> + <button id="lowerTagButton" + label="&lowerTagButton.label;" + accesskey="&lowerTagButton.accesskey;" + preference="pref.tags.disable_button.lower" + oncommand="MoveTag(false);"/> + <spacer flex="1"/> + <button id="restoreButton" + label="&restoreButton.label;" + accesskey="&restoreButton.accesskey;" + preference="pref.tags.disable_button.restore" + oncommand="Restore();"/> + </vbox> + </hbox> + </groupbox> + + </prefpane> +</overlay> diff --git a/comm/suite/mailnews/components/prefs/content/pref-viewing_messages.js b/comm/suite/mailnews/components/prefs/content/pref-viewing_messages.js new file mode 100644 index 0000000000..75b5da1b3d --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-viewing_messages.js @@ -0,0 +1,26 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// The contents of this file will be loaded into the scope of the object +// <prefpane id="viewing_messages_pane">! + +function Startup() +{ + var autoPref = document.getElementById("mailnews.mark_message_read.auto"); + UpdateMarkAsReadOptions(autoPref.value); +} + +function UpdateMarkAsReadOptions(aEnableReadDelay) +{ + EnableElementById("markAsReadAfterPreferences", aEnableReadDelay, false); + // ... and the extras! + var delayPref = document.getElementById("mailnews.mark_message_read.delay"); + UpdateMarkAsReadTextbox(aEnableReadDelay && delayPref.value, false); +} + +function UpdateMarkAsReadTextbox(aEnable, aFocus) +{ + EnableElementById("markAsReadDelay", aEnable, aFocus); +} diff --git a/comm/suite/mailnews/components/prefs/content/pref-viewing_messages.xul b/comm/suite/mailnews/components/prefs/content/pref-viewing_messages.xul new file mode 100644 index 0000000000..117761c86b --- /dev/null +++ b/comm/suite/mailnews/components/prefs/content/pref-viewing_messages.xul @@ -0,0 +1,174 @@ +<?xml version="1.0"?> + +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + +<!DOCTYPE overlay [ +<!ENTITY % pref-viewing_messagesDTD SYSTEM "chrome://messenger/locale/pref-viewing_messages.dtd"> +%pref-viewing_messagesDTD; +<!ENTITY % editorOverlayDTD SYSTEM "chrome://editor/locale/editorOverlay.dtd"> +%editorOverlayDTD; +]> + +<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + <prefpane id="viewing_messages_pane" + label="&pref.viewing.messages.title;" + script="chrome://messenger/content/pref-viewing_messages.js"> + + <preferences id="viewing_messages_preferences"> + <preference id="mailnews.reuse_message_window" + name="mailnews.reuse_message_window" + type="bool"/> + <preference id="mail.close_message_window.on_delete" + name="mail.close_message_window.on_delete" + type="bool"/> + <preference id="mailnews.message_display.disable_remote_image" + name="mailnews.message_display.disable_remote_image" + type="bool"/> + <preference id="mailnews.mark_message_read.auto" + name="mailnews.mark_message_read.auto" + type="bool" + onchange="UpdateMarkAsReadOptions(this.value);"/> + <preference id="mailnews.mark_message_read.delay" + name="mailnews.mark_message_read.delay" + type="bool" + onchange="UpdateMarkAsReadTextbox(this.value, this.value);"/> + <preference id="mailnews.mark_message_read.delay.interval" + name="mailnews.mark_message_read.delay.interval" + type="int"/> + <preference id="mail.fixed_width_messages" + name="mail.fixed_width_messages" + type="bool"/> + <preference id="mail.wrap_long_lines" + name="mail.wrap_long_lines" + type="bool"/> + <preference id="mail.display_glyph" + name="mail.display_glyph" + type="bool"/> + <preference id="mail.quoted_style" + name="mail.quoted_style" + type="int"/> + <preference id="mail.quoted_size" + name="mail.quoted_size" + type="int"/> + <preference id="mail.citation_color" + name="mail.citation_color" + type="string"/> + <preference id="mail.showCondensedAddresses" + name="mail.showCondensedAddresses" + type="bool"/> + </preferences> + + <groupbox align="start"> + <caption label="&generalMessageDisplay.caption;"/> + <label value="&openingMessages.label;" control="reuseMessageWindow"/> + <vbox class="indent"> + <radiogroup id="reuseMessageWindow" + orient="horizontal" + preference="mailnews.reuse_message_window"> + <radio id="new" + label="&newWindowRadio.label;" + accesskey="&newWindowRadio.accesskey;" + value="false"/> + <radio id="existing" + label="&existingWindowRadio.label;" + accesskey="&existingWindowRadio.accesskey;" + value="true"/> + </radiogroup> + <checkbox id="closeMsgWindowOnDelete" + label="&closeMsgWindowOnDelete.label;" + accesskey="&closeMsgWindowOnDelete.accesskey;" + preference="mail.close_message_window.on_delete"/> + </vbox> + + <checkbox id="disableContent" label="&disableContent.label;" + accesskey="&disableContent.accesskey;" + preference="mailnews.message_display.disable_remote_image"/> + <checkbox id="showCondensedAddresses" + label="&showCondensedAddresses.label;" + accesskey="&showCondensedAddresses.accesskey;" + preference="mail.showCondensedAddresses"/> + + <separator class="thin"/> + + <checkbox id="automaticallyMarkAsRead" + preference="mailnews.mark_message_read.auto" + label="&autoMarkAsRead.label;" + accesskey="&autoMarkAsRead.accesskey;" + oncommand="UpdateMarkAsReadOptions(this.checked);"/> + + <hbox align="center" class="indent"> + <checkbox id="markAsReadAfterPreferences" + label="&markAsReadAfter.label;" + accesskey="&markAsReadAfter.accesskey;" + preference="mailnews.mark_message_read.delay"/> + <textbox id="markAsReadDelay" + type="number" + size="2" + maximum="99" + preference="mailnews.mark_message_read.delay.interval" + aria-labelledby="markAsReadAfterPreferences markAsReadDelay secondsLabel"/> + <label id="secondsLabel" + value="&secondsLabel.label;"> + <observes element="markAsReadAfterPreferences" + attribute="disabled"/> + </label> + </hbox> + </groupbox> + + <groupbox> + <caption label="&displayPlainText.caption;"/> + <hbox align="center"> + <label value="&fontPlainText.label;" + accesskey="&fontPlainText.accesskey;" + control="mailFixedWidthMessages"/> + <radiogroup id="mailFixedWidthMessages" + orient="horizontal" + preference="mail.fixed_width_messages"> + <radio label="&fontFixedWidth.label;" + accesskey="&fontFixedWidth.accesskey;" + value="true"/> + <radio label="&fontVarWidth.label;" + accesskey="&fontVarWidth.accesskey;" + value="false"/> + </radiogroup> + </hbox> + + <checkbox id="wrapLongLines" label="&wrapInMsg.label;" + accesskey="&wrapInMsg.accesskey;" + preference="mail.wrap_long_lines"/> + <checkbox id="displayGlyph" label="&convertEmoticons.label;" + accesskey="&convertEmoticons.accesskey;" + preference="mail.display_glyph"/> + + <separator class="thin"/> + + <description>&displayQuoted.label;</description> + <hbox class="indent" align="center"> + <label value="&style.label;" accesskey="&style.accesskey;" control="mailQuotedStyle"/> + <menulist id="mailQuotedStyle" preference="mail.quoted_style"> + <menupopup> + <menuitem value="0" label="®ular.label;"/> + <menuitem value="1" label="&bold.label;"/> + <menuitem value="2" label="&italic.label;"/> + <menuitem value="3" label="&boldItalic.label;"/> + </menupopup> + </menulist> + + <label value="&size.label;" accesskey="&size.accesskey;" control="mailQuotedSize"/> + <menulist id="mailQuotedSize" preference="mail.quoted_size"> + <menupopup> + <menuitem value="0" label="®ular.label;"/> + <menuitem value="1" label="&bigger.label;"/> + <menuitem value="2" label="&smaller.label;"/> + </menupopup> + </menulist> + + <label value="&color.label;" accesskey="&color.accesskey;" control="mailCitationColor"/> + <colorpicker type="button" id="mailCitationColor" palettename="standard" + preference="mail.citation_color"/> + </hbox> + </groupbox> + </prefpane> +</overlay> diff --git a/comm/suite/mailnews/components/prefs/jar.mn b/comm/suite/mailnews/components/prefs/jar.mn new file mode 100644 index 0000000000..9baa230079 --- /dev/null +++ b/comm/suite/mailnews/components/prefs/jar.mn @@ -0,0 +1,23 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +messenger.jar: + content/messenger/mailPrefsOverlay.xul (content/mailPrefsOverlay.xul) +* content/messenger/pref-mailnews.xul (content/pref-mailnews.xul) + content/messenger/pref-mailnews.js (content/pref-mailnews.js) + content/messenger/pref-notifications.xul (content/pref-notifications.xul) + content/messenger/pref-notifications.js (content/pref-notifications.js) + content/messenger/pref-junk.xul (content/pref-junk.xul) + content/messenger/pref-junk.js (content/pref-junk.js) + content/messenger/pref-tags.xul (content/pref-tags.xul) + content/messenger/pref-tags.js (content/pref-tags.js) + content/messenger/pref-viewing_messages.xul (content/pref-viewing_messages.xul) + content/messenger/pref-viewing_messages.js (content/pref-viewing_messages.js) + content/messenger/pref-receipts.xul (content/pref-receipts.xul) + content/messenger/pref-receipts.js (content/pref-receipts.js) + content/messenger/pref-character_encoding.xul (content/pref-character_encoding.xul) + content/messenger/pref-character_encoding.js (content/pref-character_encoding.js) + content/messenger/pref-offline.xul (content/pref-offline.xul) + content/messenger/pref-offline.js (content/pref-offline.js) + diff --git a/comm/suite/mailnews/components/prefs/moz.build b/comm/suite/mailnews/components/prefs/moz.build new file mode 100644 index 0000000000..de5cd1bf81 --- /dev/null +++ b/comm/suite/mailnews/components/prefs/moz.build @@ -0,0 +1,6 @@ +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +JAR_MANIFESTS += ["jar.mn"] |