mail/components/preferences/advanced.xul
author Magnus Melin <mkmelin+mozilla@iki.fi>
Fri, 15 Jun 2012 23:11:53 +0300
changeset 10441 397a74ee1e0082ee473db9186ba72e56cbc9aab6
parent 10354 981ac3d7e71438e2c9bf9a8c030ded796c8fbd99
child 10599 54bf0eb08ceb5d342cb39ec3f3f938cd21ae5dbc
permissions -rw-r--r--
Bug 270373 - Thunderbird needs smooth scrolling. r=bwinton, ui-r=bwinton

<?xml version="1.0"?>
# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# 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 % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
<!ENTITY % advancedDTD SYSTEM "chrome://messenger/locale/preferences/advanced.dtd">
%brandDTD;
%advancedDTD;
#ifdef XP_WIN
<!ENTITY % searchIntegrationWinDTD SYSTEM "chrome://messenger/locale/searchIntegrationWin.dtd" >
%searchIntegrationWinDTD;
#else
#ifdef XP_MACOSX
<!ENTITY % searchIntegrationMacDTD SYSTEM "chrome://messenger/locale/searchIntegrationMac.dtd" >
%searchIntegrationMacDTD;
#else
<!ENTITY % searchIntegrationDefaultDTD SYSTEM "chrome://messenger/locale/searchIntegrationDefault.dtd" >
%searchIntegrationDefaultDTD;
#endif
#endif
]>

<overlay id="AdvancedPaneOverlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <prefpane id="paneAdvanced" onpaneload="gAdvancedPane.init();">
    <script type="application/javascript" src="chrome://messenger/content/preferences/advanced.js"/>
    <script type="application/javascript" src="chrome://communicator/content/utilityOverlay.js"/>

    <preferences id="advancedPreferences">
      <preference id="mail.preferences.advanced.selectedTabIndex"
                  name="mail.preferences.advanced.selectedTabIndex" type="int"/>
      <!-- General tab -->

      <preference id="general.autoScroll"
                  name="general.autoScroll"
                  type="bool"/>
      <preference id="general.smoothScroll"
                  name="general.smoothScroll"
                  type="bool"/>

      <preference id="mailnews.database.global.indexer.enabled" 
                  name="mailnews.database.global.indexer.enabled" 
                  type="bool"/>
      <preference id="toolkit.telemetry.enabled" 
                  name="toolkit.telemetry.enabled" 
                  type="bool"/>
#ifdef HAVE_SHELL_SERVICE
      <preference id="mail.shell.checkDefaultClient"
                  name="mail.shell.checkDefaultClient"
                  type="bool"/>
      <preference id="pref.general.disable_button.default_mail"
                  name="pref.general.disable_button.default_mail"
                  type="bool"/>
#endif
      <!-- Keep one id, so that we don't have to do platform specific stuff later -->
#ifdef XP_WIN
      <preference id="searchintegration.enable"
                  name="mail.winsearch.enable"
                  type="bool"/>
#else
#ifdef XP_MACOSX
      <preference id="searchintegration.enable"
                  name="mail.spotlight.enable"
                  type="bool"/>
#else
      <!-- We don't have any OS search integration for linux yet. -->
      <preference id="searchintegration.enable"
                  name="mail.XXX.enable"
                  type="bool"/>
#endif
#endif

      <!-- Display & Reading tab -->
      <preference id="mail.showCondensedAddresses" name="mail.showCondensedAddresses" type="bool"/>
      <preference id="mailnews.mark_message_read.auto"
                  name="mailnews.mark_message_read.auto" type="bool"/>
      <preference id="mailnews.mark_message_read.delay"
                  name="mailnews.mark_message_read.delay" type="bool"
                  onchange="gAdvancedPane.updateMarkAsReadTextbox(this.value);"/>
      <preference id="mailnews.mark_message_read.delay.interval"
                  name="mailnews.mark_message_read.delay.interval" type="int"/>
      <preference id="mail.openMessageBehavior" name="mail.openMessageBehavior" type="int"/>
      <preference id="mail.close_message_window.on_delete" 
                  name="mail.close_message_window.on_delete" type="bool"/>
      <!-- Network tab -->
      <preference id="mail.prompt_purge_threshhold"          name="mail.prompt_purge_threshhold"    type="bool"/>
      <preference id="mail.purge_threshhold_mb"              name="mail.purge_threshhold_mb"  type="int"/>
      <preference id="browser.cache.disk.capacity"
                  name="browser.cache.disk.capacity" type="int"/>
      <!-- Update tab -->
#ifdef MOZ_UPDATER
      <preference id="app.update.enabled" name="app.update.enabled" type="bool"
                  onchange="gAdvancedPane.updateAppUpdateItems();
                            gAdvancedPane.updateAutoItems();
                            gAdvancedPane.updateModeItems();"/>
      <preference id="app.update.auto" name="app.update.auto" type="bool"
                  onchange="gAdvancedPane.updateAutoItems(); gAdvancedPane.updateModeItems();"/>
      <preference id="app.update.mode" name="app.update.mode" type="int"
                  onchange="gAdvancedPane.updateModeItems();"/>
      <preference id="app.update.disable_button.showUpdateHistory"
                  name="app.update.disable_button.showUpdateHistory"
                  type="bool"/>

#ifdef MOZ_MAINTENANCE_SERVICE
      <preference id="app.update.service.enabled"
                  name="app.update.service.enabled"
                  type="bool"/>
#endif
#endif
      <preference id="extensions.update.enabled" name="extensions.update.enabled" type="bool"
                  onchange="gAdvancedPane.updateAddonUpdateUI();"/>
      <!-- Certificates tab -->
      <preference id="security.default_personal_cert"
                  name="security.default_personal_cert"
                  type="string"/>
      <preference id="security.disable_button.openCertManager"
                  name="security.disable_button.openCertManager"
                  type="bool"/>
      <preference id="security.OCSP.disable_button.managecrl"
                  name="security.OCSP.disable_button.managecrl"
                  type="bool"/>
      <preference id="security.disable_button.openDeviceManager"
                  name="security.disable_button.openDeviceManager"
                  type="bool"/>
    </preferences>

#ifdef HAVE_SHELL_SERVICE
    <stringbundle id="bundlePreferences" src="chrome://messenger/locale/preferences/preferences.properties"/>
    <stringbundle id="bundleBrand" src="chrome://branding/locale/brand.properties"/>
#endif

    <tabbox id="advancedPrefs" flex="1" onselect="gAdvancedPane.tabSelectionChanged();">
      <tabs>
        <tab label="&itemGeneral.label;"/>
        <tab label="&itemDisplay.label;"/>
        <tab id="networkingTab" label="&itemNetworking.label;"/>
        <tab label="&itemUpdate.label;"/>
        <tab label="&itemCertificates.label;"/>
      </tabs>

      <tabpanels flex="1">
        <!-- General -->
        <tabpanel orient="vertical">
          <hbox align="center">
            <description flex="1">&returnReceiptsInfo.label;</description>
            <button label="&showReturnReceipts.label;"
                    accesskey="&showReturnReceipts.accesskey;"
                    oncommand="gAdvancedPane.showReturnReceipts();"/>
          </hbox>

          <!-- Scrolling -->
          <groupbox id="scrollingGroup">
            <caption label="&scrolling.label;"/>

            <checkbox id="useAutoScroll"
                      label="&useAutoScroll.label;"
                      accesskey="&useAutoScroll.accesskey;"
                      preference="general.autoScroll"/>
            <checkbox id="useSmoothScrolling"
                      label="&useSmoothScrolling.label;"
                      accesskey="&useSmoothScrolling.accesskey;"
                      preference="general.smoothScroll"/>
          </groupbox>

#ifdef HAVE_SHELL_SERVICE
          <groupbox id="systemDefaultsGroup" orient="vertical">
            <caption label="&systemIntegration.label;"/>
            <hbox id="checkDefaultBox" align="center" flex="1">
              <checkbox id="alwaysCheckDefault"
                        preference="mail.shell.checkDefaultClient"
                        label="&alwaysCheckDefault.label;"
                        accesskey="&alwaysCheckDefault.accesskey;" flex="1"/>
              <button id="checkDefaultButton" label="&checkNow.label;"
                      accesskey="&checkNow.accesskey;"
                      oncommand="gAdvancedPane.checkDefaultNow();"
                      preference="pref.general.disable_button.default_mail"/>
            </hbox>
            <hbox id="searchIntegrationContainer">
              <checkbox id="searchIntegration"
                        preference="searchintegration.enable"
                        label="&searchIntegration.label;"
                        accesskey="&searchIntegration.accesskey;"/>
            </hbox>
          </groupbox>
#endif
          <groupbox>
            <caption label="&configEditDesc.label;"/>
            <vbox>
              <hbox>
                <checkbox id="enableGloda"
                          preference="mailnews.database.global.indexer.enabled"
                          label="&enableGlodaSearch.label;"
                          accesskey="&enableGlodaSearch.accesskey;"/>
              </hbox>
              <hbox>
                <checkbox id="submitTelemetry"
                          preference="toolkit.telemetry.enabled"
                          label="&submitTelemetry.label;"
                          accesskey="&submitTelemetry.accesskey;"/>
              </hbox>
              <hbox class="indent">
                <label id="telemetryInfoLink"
                       class="text-link"
                       onclick="if (event.button == 0) openPrivacyPolicy('tab');"
                       value="&telemetryInfoLink.label;" />

              </hbox>
            </vbox>
            <vbox>
              <hbox pack="end">
                <button id="configEditor" label="&configEdit.label;"
                        accesskey="&configEdit.accesskey;"
                        oncommand="gAdvancedPane.showConfigEdit();"/>
              </hbox>
            </vbox>
          </groupbox>
        </tabpanel>

        <!-- Reading and Display -->
        <tabpanel orient="vertical">
          <groupbox>
            <caption label="&reading.caption;"/>

            <vbox>
              <hbox>
                <checkbox id="automaticallyMarkAsRead"
                          preference="mailnews.mark_message_read.auto"
                          label="&autoMarkAsRead.label;"
                          accesskey="&autoMarkAsRead.accesskey;"
                          oncommand="gAdvancedPane.updateMarkAsReadOptions(this.checked)"/>
              </hbox>

              <radiogroup id="markAsReadAutoPreferences" orient="vertical"
                          class="indent"
                          preference="mailnews.mark_message_read.delay">
                <radio id="mark_read_immediately" value="false"
                       label="&markAsReadNoDelay.label;"
                       accesskey="&markAsReadNoDelay.accesskey;"/>
                <hbox align="center">
                  <radio id="markAsReadAfterDelay" value="true"
                         label="&markAsReadDelay.label;"
                         accesskey="&markAsReadDelay.accesskey;"/>
                  <textbox id="markAsReadDelay" size="2"
                           type="number" max="2147483"
                           preference="mailnews.mark_message_read.delay.interval"
                           aria-labelledby="markAsReadAfterDelay markAsReadDelay secondsLabel"/>
                  <label id="secondsLabel" value="&secondsLabel.label;"/>
                </hbox>
              </radiogroup>
            </vbox>

            <vbox>
              <hbox>
                <label value="&openMsgIn.label;"
                       control="mailOpenMessageBehavior"/>
              </hbox>

              <hbox>
                <radiogroup id="mailOpenMessageBehavior" class="indent"
                            preference="mail.openMessageBehavior"
                            orient="horizontal">
                  <radio id="newTab" value="2" label="&openMsgInNewTab.label;"
                         accesskey="&openMsgInNewTab.accesskey;"/>
                  <radio id="newWindow" value="0" label="&reuseExpRadio0.label;"
                         accesskey="&reuseExpRadio0.accesskey;"/>
                  <radio id="existingWindow" value="1"
                         label="&reuseExpRadio1.label;"
                         accesskey="&reuseExpRadio1.accesskey;"/>
                </radiogroup>
              </hbox>
              <hbox>
                <checkbox id="closeMsgOnMoveOrDelete"
                          label="&closeMsgOnMoveOrDelete.label;"
                          accesskey="&closeMsgOnMoveOrDelete.accesskey;"
                          preference="mail.close_message_window.on_delete"/>
              </hbox>
            </vbox>

          </groupbox>

          <groupbox>
            <caption label="&display.caption;"/>

            <hbox>
              <checkbox id="showCondensedAddresses"
                        label="&showCondensedAddresses.label;"
                        accesskey="&showCondensedAddresses.accesskey;"
                        preference="mail.showCondensedAddresses"/>
            </hbox>
          </groupbox>

        </tabpanel>

        <tabpanel orient="vertical">
          <!-- Networking & Disk Space -->
          <groupbox>
            <caption label="&connectionsInfo.caption;"/>
            <hbox align="center">
              <description flex="1" control="catProxiesButton">&proxiesConfigure.label;</description>
              <button id="catProxiesButton" icon="network" label="&showSettings.label;"
                      accesskey="&showSettings.accesskey;"
                      oncommand="gAdvancedPane.showConnections();"/>
            </hbox>
          </groupbox>

          <groupbox>
            <caption label="&offlineInfo.caption;"/>
            <hbox align="center">
              <description flex="1" control="offlineSettingsButton">&offlineInfo.label;</description>
              <button id="offlineSettingsButton" label="&showOffline.label;"
                      accesskey="&showOffline.accesskey;"
                      oncommand="gAdvancedPane.showOffline();"/>
            </hbox>
          </groupbox>

          <groupbox>
            <caption label="&Diskspace;"/>
            <hbox align="center">
              <label id="useCacheBefore" control="cacheSize"
                     accesskey="&useCacheBefore.accesskey;" value="&useCacheBefore.label;"/>
              <textbox id="cacheSize" type="number" size="4" max="1024"
                       preference="browser.cache.disk.capacity"
                       onsyncfrompreference="return gAdvancedPane.readCacheSize();"
                       onsynctopreference="return gAdvancedPane.writeCacheSize();"
                       aria-labelledby="useCacheBefore cacheSize useCacheAfter"/>
              <label id="useCacheAfter" flex="1">&useCacheAfter.label;</label>
              <button id="clearCacheButton" icon="clear"
                      label="&clearCacheNow.label;" accesskey="&clearCacheNow.accesskey;"
                      oncommand="gAdvancedPane.clearCache();"/>
            </hbox>
            <hbox align="center">
                <checkbox id="offlineCompactFolder" label="&offlineCompact.label;" accesskey="&offlineCompact.accesskey;"
                          preference="mail.prompt_purge_threshhold"/>
                <textbox id="offlineCompactFolderMin" size="5" value="20"
                         type="number" min="1" max="2048" increment="10"
                         preference="mail.purge_threshhold_mb"
                         aria-labelledby="offlineCompactFolder offlineCompactFolderMin compactFolderMB"/>
                <label id="compactFolderMB" value="&mb.label;"/>
            </hbox>
          </groupbox>
        </tabpanel>

        <!-- Update -->

        <tabpanel orient="vertical" align="start">
          <label control="autoUpdateGroup">&autoCheck.label;</label>
          <vbox class="indent" id="autoUpdateGroup" role="group">
#ifdef MOZ_UPDATER
            <checkbox id="enableAppUpdate"
                      label="&enableAppUpdate.label;"
                      accesskey="&enableAppUpdate.accesskey;"
                      preference="app.update.enabled"/>
#endif
            <checkbox id="enableAddonUpdate"
                      label="&enableAddonsUpdate.label;"
                      accesskey="&enableAddonsUpdate.accesskey;"
                      preference="extensions.update.enabled"/>
          </vbox>
#ifdef MOZ_UPDATER
          <separator/>
          <label id="updateModeLabel" control="updateMode">&whenUpdatesFound.label;</label>
          <radiogroup id="updateMode" class="indent"
                      preference="app.update.auto">
            <radio id="ask" value="false"
                   label="&modeAskMe.label;"
                   accesskey="&modeAskMe.accesskey;"/>
            <radio id="automatic" value="true"
                   label="&modeAutomatic.label;"
                   accesskey="&modeAutomatic.accesskey;"/>
            <hbox class="indent">
              <checkbox id="warnIncompatible"
                        label="&modeAutoAddonWarn.label;" accesskey="&modeAutoAddonWarn.accesskey;"
                        preference="app.update.mode"
                        onsyncfrompreference="return gAdvancedPane.addonWarnSyncFrom();"
                        onsynctopreference="return gAdvancedPane.addonWarnSyncTo();"/>
            </hbox>
          </radiogroup>
          <separator/>
          <hbox>
            <button id="showUpdateHistory"
                    label="&showUpdates.label;" accesskey="&showUpdates.accesskey;"
                    preference="app.update.disable_button.showUpdateHistory"
                    oncommand="gAdvancedPane.showUpdates();"/>
          </hbox>

#ifdef MOZ_MAINTENANCE_SERVICE
            <checkbox id="useService"
                      label="&useService.label;"
                      accesskey="&useService.accesskey;"
                      preference="app.update.service.enabled"/>
#endif
#endif
        </tabpanel>

        <!-- Certificates -->
        <tabpanel orient="vertical">
          <description id="CertSelectionDesc" control="certSelection">&certSelection.description;</description>

          <!--
            The values on these radio buttons may look like l12y issues, but
            they're not - this preference uses *those strings* as its values.
            I KID YOU NOT.
          -->
          <radiogroup id="certSelection" class="indent"
                      orient="horizontal" preftype="string"
                      preference="security.default_personal_cert"
                      aria-labelledby="CertGroupCaption CertSelectionDesc">
            <radio label="&certs.auto;" accesskey="&certs.auto.accesskey;"
                    value="Select Automatically"/>
            <radio label="&certs.ask;" accesskey="&certs.ask.accesskey;"
                    value="Ask Every Time"/>
          </radiogroup>

          <separator/>

#ifdef XP_MACOSX
          <vbox>
#endif
          <hbox>
            <button id="viewCertificatesButton"
                    label="&viewCertificates.label;"
                    accesskey="&viewCertificates.accesskey;"
                    oncommand="gAdvancedPane.showCertificates();"
                    preference="security.disable_button.openCertManager"/>
            <button id="viewCRLButton"
                    label="&viewCRLs.label;" accesskey="&viewCRLs.accesskey;"
                    oncommand="gAdvancedPane.showCRLs();"
                    preference="security.OCSP.disable_button.managecrl"/>
            <button id="verificationButton"
                    label="&validation.label;" accesskey="&validation.accesskey;"
                    oncommand="gAdvancedPane.showOCSP();"/>
#ifdef XP_MACOSX
          </hbox>
          <hbox>
#endif
            <button id="viewSecurityDevicesButton"
                    label="&viewSecurityDevices.label;"
                    accesskey="&viewSecurityDevices.accesskey;"
                    oncommand="gAdvancedPane.showSecurityDevices();"
                    preference="security.disable_button.openDeviceManager"/>
          </hbox>
#ifdef XP_MACOSX
          </vbox>
#endif
        </tabpanel>
      </tabpanels>
    </tabbox>
    <separator/>
  </prefpane>
</overlay>