<?xml version="1.0"?> 
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/dialogOverlay.css" type="text/css"?>

<!DOCTYPE window SYSTEM "chrome://messenger/locale/messengercompose/pref-formatting.dtd">

<window xmlns:html="http://www.w3.org/1999/xhtml"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        onload="Init()"
        orient="vertical"
        class="color-dialog">

  <script type="application/x-javascript">
  <![CDATA[
    var _elementIDs = ["mailDefaultHTMLAction","mailhtmldomain","mailplaintextdomain"];
  ]]>
  </script>  
  <script type="application/x-javascript" src="chrome://messenger/content/messengercompose/pref-formatting.js"/>
  
  <!-- we are using these DTD values for localization -->
 
  <data id="domaindlg" htmldlg_title="&add.htmltitle;" htmldlg_msg="&add.htmldomain;"
        plaintextdlg_title="&add.plaintexttitle;" plaintextdlg_msg="&add.plaintextdomain;"/>
  <data id="domainerrdlg" domainerrdlg_title="&domainnameError.title;" duperr="&duplicationError.label;"
        dualerr="&dualEntryError.label;"/>

  <broadcaster  id="mailhtmldomain" 
                pref="true"
                preftype="string" 
                prefstring="mailnews.html_domains"
                prefattribute="value"
                wsm_attributes="value"/>
  <broadcaster  id="mailplaintextdomain" 
                pref="true"
                preftype="string" 
                prefstring="mailnews.plaintext_domains"
                prefattribute="value"
                wsm_attributes="value"/>
  
  <hbox class="box-smallheader" title="&pane.title;"/>

  <html>&sendMaildesc.label;</html>

  <radiogroup id="mailDefaultHTMLAction" orient="vertical" autostretch="never"
                pref="true" preftype="int" prefstring="mail.default_html_action"
                prefattribute="value">
    <radio group="mailDefaultHTMLAction" value="0" label="&askMe.label;"/>
    <radio group="mailDefaultHTMLAction" value="1" label="&convertPlain.label;"/>                
    <radio group="mailDefaultHTMLAction" value="2" label="&sendHTML.label;"/>
    <radio group="mailDefaultHTMLAction" value="3" label="&sendBoth.label;"/>
  </radiogroup>
    
  <html>&override.label;</html>

  <groupbox orient="vertical" flex="1">
    <label value="&domain.title;"/>

    <html>&domaindesc.label;</html>

    <hbox flex="1">
      <vbox id="html_box" flex="1">
        <html>&HTMLdomaintitle.label;</html>
        <hbox flex="1">
          <tree class="inset" id="html_domains" flex="1"
            datasources="rdf:null" multiple="true"
            onkeypress="if (event.keyCode == 8 || event.keyCode == 46) RemoveDomains(htmlobj);">
            <treecolgroup>
              <treecol flex="1"/>
            </treecolgroup>
            <treechildren id="html_domains_root" flex="1"/>
          </tree>
          <vbox>
            <button class="dialog" label="&AddButton.label;" oncommand="AddDomain(htmlobj);">
              <observes element="mailhtmldomain" attribute="disabled"/>
            </button>
            <button class="dialog" label="&DeleteButton.label;" oncommand="RemoveDomains(htmlobj);">
              <observes element="mailhtmldomain" attribute="disabled"/>
            </button>
          </vbox>
        </hbox>
      </vbox>
      <vbox id="plaintext_box" flex="1">
        <html>&PlainTexttitle.label;</html>
        <hbox flex="1">
          <tree class="inset" id="plaintext_domains" flex="1"
            datasources="rdf:null" multiple="true"
            onkeypress="if (event.keyCode == 8 || event.keyCode == 46) RemoveDomains(plainobj);">
            <treecolgroup>
              <treecol flex="1"/>
            </treecolgroup>
            <treechildren id="plaintext_domains_root" flex="1"/>
          </tree>
          <vbox>
            <button class="dialog" label="&AddButton.label;" oncommand="AddDomain(plainobj);">
              <observes element="mailplaintextdomain" attribute="disabled"/>
            </button>
            <button class="dialog" label="&DeleteButton.label;" oncommand="RemoveDomains(plainobj);">
              <observes element="mailplaintextdomain" attribute="disabled"/>
            </button>
          </vbox>
        </hbox>
      </vbox>
    </hbox>
  </groupbox>
</window>
