<?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/addressbook/pref-addressing.dtd">

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

  <script type="application/x-javascript" src="chrome://messenger/content/addressbook/pref-directory.js"/>
  <script type="application/x-javascript">
  <![CDATA[
    var _elementIDs = ["emailCollectionIncoming", "emailCollectionOutgoing", 
                       "emailCollectionNewsgroup", "addressingAutocomplete",
                       "enableCABsizeLimit", "CABsizeLimit", "autocompleteLDAP", 
                       "directoriesList"];

  function onLoad(){
    createDirectoriesList(true);
    parent.initPanel('chrome://messenger/content/addressbook/pref-addressing.xul');   
  }

  function Startup(){
    enableAutocomplete();
  }
  ]]>
  </script>  
    
  <hbox class="box-smallheader" title="&pane.title;"/>

  <groupbox orient="vertical" class="small-margin">
    <label value="&emailCollectiontitle.label;"/>
  <html class="small-margin">&emailCollectiontext.label;</html>
    <vbox autostretch="never" class="indent">
    <checkbox class="small-margin" id="emailCollectionIncoming" label="&emailCollectionIncomingEnable.label;"
              pref="true" preftype="bool" prefstring="mail.collect_email_address_incoming"
              prefattribute="checked"/>
    <checkbox class="small-margin" id="emailCollectionOutgoing" label="&emailCollectionOutgoingEnable.label;"
              pref="true" preftype="bool" prefstring="mail.collect_email_address_outgoing"
              prefattribute="checked"/>
    <checkbox class="small-margin" id="emailCollectionNewsgroup" label="&emailCollectionNewsgroupEnable.label;"
              pref="true" preftype="bool" prefstring="mail.collect_email_address_newsgroup"
              prefattribute="checked"/>
    </vbox>
    <hbox autostretch="never">
      <checkbox class="small-margin" id="enableCABsizeLimit" label="&useCABSizelimitPart1.label;"
                pref="true" preftype="bool" prefstring="mail.collect_email_address_enable_size_limit"
                prefattribute="checked"/>
      <textbox class="small-margin" id="CABsizeLimit" size="6" pref="true" preftype="int"
               prefstring="mail.collect_email_address_size_limit" prefattribute="value"/>
      <text id="useCABSizelimitPart2" class="label small-margin" value="&useCABSizelimitPart2.label;"/>
    </hbox> 
  </groupbox>
	
    <groupbox class="small-margin" orient="vertical"  id="addressAutocompletion">
      <label value="&addressingTitle.label;"/>
      <html class="small-margin">&autocompleteText.label;</html>
      <hbox autostretch="never">
        <checkbox class="small-margin" id="addressingAutocomplete" label="&addressingEnable.label;"
          pref="true" preftype="bool" prefstring="mail.enable_autocomplete"
          prefattribute="checked"/>
      </hbox>
      <hbox autostretch="never">
        <checkbox class="small-margin" id="autocompleteLDAP" label="&directories.label;" 
                  pref="true" preftype="bool" 
                  prefstring="ldap_2.autoComplete.useDirectory" 
                  prefattribute="checked" 
                  oncommand="enableAutocomplete();"/>
        <menulist class="small-margin" id="directoriesList" flex="1"
                  pref="true" preftype="string" 
                  prefstring="ldap_2.autoComplete.directoryServer"
                  prefattribute="value">
          <menupopup id="directoriesListPopup" 
            oncreate="createDirectoriesList(true);">
          </menupopup>
       </menulist>
       <button class="small-margin" id="editButton" label="&editDirectories.label;" 
               pref="true" preftype="bool" 
               prefstring="pref.ldap.disable_button.edit_directories" 
               prefattribute="disabled"
               oncommand="onEditDirectories();"/>
     </hbox>
     <!--
     <html class="small-margin">&matchText.label;</html>
     <hbox autostretch="never">
       <checkbox class="small-margin" id="autocompleteSkipDirectory"
                 label="&skipDirectory.label;" 
                 pref="true" preftype="bool" 
                 prefstring="ldap_2.autoComplete.skipDirectoryIfLocalMatchFound"
                 prefattribute="checked"/>    
     </hbox>
     -->
   </groupbox>
</window>
