<?xml version="1.0"?>
<!--
 * ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public
 * License Version 1.1 (the "MPL"); you may not use this file
 * except in compliance with the MPL. You may obtain a copy of
 * the MPL at http://www.mozilla.org/MPL/
 *
 * Software distributed under the MPL is distributed on an "AS
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 * implied. See the MPL for the specific language governing
 * rights and limitations under the MPL.
 *
 * The Original Code is Enigmail.
 *
 * The Initial Developer of the Original Code is Marius Stübs.
 * Portions created by Marius Stübs <marius.stuebs@riseup.net> are
 * Copyright (C) 2013 Marius Stübs. All Rights Reserved.
 *
 * Contributor(s):
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 * ***** END LICENSE BLOCK ***** *
-->


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

<!DOCTYPE window [
  <!ENTITY % brandDTD SYSTEM "chrome://global/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"/>
  <script type="application/x-javascript">
  <![CDATA[
    /* pass */
  ]]>
  </script>


  
  <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>

