<?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 https://mozilla.org/MPL/2.0/.
-->

<?xml-stylesheet href="chrome://messenger/skin/" type="text/css"?>
<!-- ?xml-stylesheet href="chrome://enigmail/skin/enigmail.css" type="text/css"? -->

<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % enigMailDTD SYSTEM "chrome://enigmail/locale/enigmail.dtd" >
%enigMailDTD;
]>

<dialog id="enigmailKeySelectionDlg"
        title="&enigmail.userSelectionList.label;"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        onload="onLoad();"
        buttons="accept,cancel,extra1"
        buttonlabelaccept="&enigmail.send.label;"
        ondialogaccept="return onAccept();"
        buttonlabelextra1="&enigmail.perRecipientsOption.label;"
        ondialogextra1="newRecipientRule();"
        minheight="450">


  <script type="application/x-javascript" src="chrome://enigmail/content/enigmailCommon.js"/>
  <script type="application/x-javascript" src="chrome://enigmail/content/enigmailKeySelection.js"/>

  <groupbox id="dialogHeadline" orient="vertical">
     <caption id="usersNotFoundCapt" label="&enigmail.usersNotFound.label;"/>
     <listbox id="dialogMsgList"
              rows="3"
              collapsed="true"
              editable="false"
              disableKeyNavigation="true"
              suppressonselect="true"
              >
       <listcols editable="false" class="plain" >
         <listcol />
         <listcol flex="1" />
       </listcols>
     </listbox>
     <description id="dialogHeaderDesc" width="700px" collapsed="true">...</description>
  </groupbox>

  <!-- <separator/> -->

  <vbox flex="1">
    <groupbox width="700px" flex="1">
      <caption id="dialogHeader"
               label="..." collapsed="true"/>

      <hbox flex="0" align="center">
        <label value="&enigmail.keyMan.filter.label;" control="filterKey"/>
        <textbox id="filterKey" size="30"
                 type="search"
                 timeout="500"
                 oncommand="onSearchInput();"/>
      </hbox>

      <tree  id="enigmailUserIdSelection" flex="1"
        hidecolumnpicker="false"
        seltype="single"
        style="height:300px"
        onkeypress="userSelCallback(event)">
        <!-- onclick="userSelCallback(event);" -->

        <treecols>
          <treecol id="selectionCol" style="width:19px"
                   label="&enigmail.keySelection.label;"
                   class="treecol-image"
                   src="chrome://enigmail/content/check1.png"
                   ignoreincolumnpicker="true"
                   persist="width"/>
          <splitter class="tree-splitter"/>
          <treecol id="enigUserNameCol" primary="true"
                   flex="1"
                   ignoreincolumnpicker="true"
                   label="&enigmail.keyUserId.label;"/>
          <splitter class="tree-splitter"/>
          <treecol id="uidValidityCol" style="width:85px"
                   label="&enigmail.uidValidity.label;"
                   persist="width,hidden"/>
          <splitter class="tree-splitter"/>
          <treecol id="expCol" style="width:70px"
                   label="&enigmail.keyExpiry.label;"
                   persist="width,hidden"/>
          <splitter class="tree-splitter"/>
          <treecol id="keyCol" style="width:90px"
                   label="&enigmail.keyId.label;"
                   persist="width,hidden"/>
        </treecols>

        <treechildren id="enigmailUserIdSelectionChildren"
              properties="sendUnencrypted"/>

      </tree>
    </groupbox>

    <checkbox id="enigmailUserSelSendEncrypted"
              label="&enigmail.userSelSendEncrypted.label;"
              accesskey="&enigmail.userSelSendEncrypted.accesskey;"
              checked="true"
              oncommand="switchSendEncryptedCallback();"/>
    <checkbox id="enigmailUserSelSendSigned"
              label="&enigmail.userSelSendSigned.label;"
              accesskey="&enigmail.userSelSendSigned.accesskey;"
              checked="true"
              oncommand="switchSendSignedCallback();"/>

    <checkbox id="displayNoLonger"
              label="&enigmail.displayNoLonger.label;"
              checked="false"
              disabled="true"
              collapsed="true"/>
  </vbox>

  <hbox>
    <button class="dialog"
            id="refreshKeys"
            label="&enigmail.refreshKeys.label;"
            accesskey="&enigmail.refreshKeys.accesskey;"
            oncommand="refreshKeys();"/>

    <button class="dialog"
            halign="right"
            id="importMissingKeys"
            collapsed="true"
            label="&enigmail.importMissingKeys.label;"
            accesskey="&enigmail.importMissingKeys.accesskey;"
            tooltip="&enigmail.importMissingKeys.tooltip;"
            oncommand="searchMissingKeys();"/>
  </hbox>
</dialog>
