<?xml version="1.0"?>

<?xml-stylesheet href="chrome://global/skin/"?>
<?xml-stylesheet href="chrome://messenger/skin/preferences/preferences.css"?>

<!DOCTYPE prefwindow [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % sendOptionsDTD SYSTEM "chrome://messenger/locale/preferences/sendoptions.dtd" >
%sendOptionsDTD;
]>

<prefwindow id="SendOptionsDialog" type="child"
            xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
            dlgbuttons="accept,cancel"
            style="min-height: 33em;"
            title="&dialog.title;">

  <prefpane id="SendOptionsDialogPane" onpaneload="gSendOptionsDialog.init();">
    <script type="application/javascript" src="chrome://messenger/content/preferences/sendoptions.js"/>

    <stringbundle id="bundlePreferences" src="chrome://messenger/locale/preferences/preferences.properties"/>

    <preferences id="SendOptionsPreferences">
      <preference id="mail.default_html_action"      name="mail.default_html_action" type="int"/>
      <preference id="mailnews.html_domains"         name="mailnews.html_domains" type="string"/>
      <preference id="mailnews.plaintext_domains"    name="mailnews.plaintext_domains"    type="string"/>
    </preferences>

    <groupbox>
      <caption label="&sendMail.title;"/>

      <label control="mailDefaultHTMLAction" width="1">&sendMaildesc.label;</label>

      <hbox class="indent" id="thenBox">
        <menulist id="mailDefaultHTMLAction" preftype="int" preference="mail.default_html_action">
          <menupopup>
            <menuitem value="0" label="&askMe.label;" accesskey="&askMe.accesskey;"/>
            <menuitem value="1" label="&convertPlain.label;" accesskey="&convertPlain.accesskey;"/>
            <menuitem value="2" label="&sendHTML.label;" accesskey="&sendHTML.accesskey;"/>
            <menuitem value="3" label="&sendBoth.label;" accesskey="&sendBoth.accesskey;"/>
          </menupopup>
        </menulist>
      </hbox>

      <separator class="thin"/>

      <description control="mailDefaultHTMLAction">&override.label;</description>
    </groupbox>

    <separator class="thin"/>

    <tabbox>
      <tabs id="sendOptionsTabs">
        <tab label="&HTMLTab.label;" accesskey="&HTMLTab.accesskey;"/>
        <tab label="&PlainTextTab.label;" accesskey="&PlainTextTab.accesskey;"/>
      </tabs>

      <tabpanels id="sendOptionsTabsPanels" flex="1">

        <vbox index="HTML">
          <label control="html_domains" width="1">&domaindesc.label;</label>

          <hbox>
            <listbox id="html_domains" flex="1" seltype="multiple" rows="5"
                     class="uri-element"
                     preference="mailnews.html_domains"
                     onsynctopreference="return gSendOptionsDialog.saveDomainPref(true);"
                     onkeypress="if (event.keyCode == KeyEvent.DOM_VK_BACK_SPACE || event.keyCode == KeyEvent.DOM_VK_DELETE) gSendOptionsDialog.removeDomains(true);"/>
            <vbox>
              <button label="&AddHtmlDomain.label;" oncommand="gSendOptionsDialog.addDomain(true);" accesskey="&AddHtmlDomain.accesskey;"/>
              <button label="&DeleteHtmlDomain.label;" oncommand="gSendOptionsDialog.removeDomains(true);" accesskey="&DeleteHtmlDomain.accesskey;"/>
            </vbox>
          </hbox>
        </vbox>

        <vbox index="plainText">
          <label control="plaintext_domains" width="1">&domaindesc.label;</label>

          <hbox>
            <listbox id="plaintext_domains" flex="1" seltype="multiple" rows="5"
                     class="uri-element"
                     preference="mailnews.plaintext_domains"
                     onsynctopreference="return gSendOptionsDialog.saveDomainPref(false);"
                     onkeypress="if (event.keyCode == KeyEvent.DOM_VK_BACK_SPACE || event.keyCode == KeyEvent.DOM_VK_DELETE) gSendOptionsDialog.removeDomains(false);"/>
            <vbox>
              <button label="&AddPlainText.label;" oncommand="gSendOptionsDialog.addDomain(false);" accesskey="&AddPlainText.accesskey;"/>
              <button label="&DeletePlainText.label;" oncommand="gSendOptionsDialog.removeDomains(false);" accesskey="&DeletePlainText.accesskey;"/>
            </vbox>
          </hbox>
        </vbox>

      </tabpanels>
    </tabbox>

    <separator/>
  </prefpane>
</prefwindow>
