<?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;
  <!ENTITY % utilDTD SYSTEM "chrome://communicator/locale/utilityOverlay.dtd">
   %utilDTD;
]>


<dialog id="enigmailEditKeyExpiryDlg"
        title="&enigmail.keyExpiry.title;"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        onload="onLoad();"
        ondialogaccept="return onAccept();"
        minwidth="460px"
        persist="width height"
        >


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


  <vbox orient="vertical">
    <hbox>
      <label value="&enigmail.keyExpiry.expiryKey.label;" control="keyIdList"/>
    </hbox>
      <hbox flex="1">
    <tree id="subkeyList" flex="1"
      enableColumnDrag="false"
      style="height:150px"
      hidecolumnpicker="true"
      onclick="enigmailKeySelCallback(event);">

      <treecols>
        <treecol id="selectionCol"
                 primary="true" style="width:35px"
                 label="&enigmail.keySelection.label;"
                 persist="width"/>
        <splitter class="tree-splitter"/>

        <treecol id="subkeyCol" primary="true"
            label="&enigmail.keyDetails.keyPart.label;"
            style="width:86px"
            persist="width"/>
        <splitter class="tree-splitter"/>
        <treecol id="keyTypeCol" style="width:92px"
                 label="&enigmail.keyDetails.ID.label;"
                 persist="width"/>
        <splitter class="tree-splitter"/>
        <treecol id="algoCol" style="width:55px"
                 label="&enigmail.keyDetails.algorithm.label;"
                 persist="width"/>
        <splitter class="tree-splitter"/>
        <treecol id="sizeCol" style="width:37px"
                 label="&enigmail.keyDetails.size.label;"
                 persist="width"/>
        <splitter class="tree-splitter"/>
        <treecol id="createdCol" style="width:65px"
                 label="&enigmail.keyDetails.created.label;"
                 persist="width"/>
        <splitter class="tree-splitter"/>
        <treecol id="expiryCol" style="width:65px"
                 label="&enigmail.keyDetails.expiry.label;"
                 persist="width"/>
        <splitter class="tree-splitter"/>
        <treecol id="UsageCol"
                 label="&enigmail.keyDetails.usage.label;"
                 flex="1"/>
      </treecols>

      <treechildren id="keyListChildren"/>

    </tree>
  </hbox>

    <separator/>
    <hbox>
      <hbox align="center">
        <label value="&enigmail.keyGen.expire.label;" control="expireInput"/>
      </hbox>
      <hbox align="center">
        <textbox id="expireInput" size="5" maxlength="5" value="1"
                 onchange="return checkExpirationDate();"/>
        <menulist id="timeScale" label="&enigmail.keyGen.years.label;"
                  value="365" onchange="return checkExpirationDate();">
          <menupopup id="timeScalePopup">
            <menuitem id="years" value="365" label="&enigmail.keyGen.years.label;" selected="true"/>
            <menuitem id="months" value="30" label="&enigmail.keyGen.months.label;"/>
<!--        <menuitem id="weeks" value="7" label="&enigmail.keyGen.weeks.label;"/> -->
            <menuitem id="days" value="1" label="&enigmail.keyGen.days.label;"/>
          </menupopup>
        </menulist>
        <checkbox label="&enigmail.keyGen.noExpiry.label;"
                  id="noExpiry" oncommand="return onNoExpiry();"/>
      </hbox>
    </hbox>
  </vbox>
</dialog>
