<?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="&regular.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="&regular.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>
