<?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 Patrick Brunschwig.
 * Portions created by Patrick Brunschwig <patrick@enigmail.net> are
 * Copyright (C) 2004 Patrick Brunschwig. 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;
]>

<dialog id="enigmailKeyDetailsDlg"
        title="&enigmail.keyDetails.title;"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        buttons="accept"
        minwidth="450px"
        persist="width height"
        buttonlabelaccept="&enigmail.cardDetails.closeWindow.label;"
        onload="onLoad();">


  <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/enigmailKeyManager.js"/>

  <broadcasterset>
    <broadcaster id="ownKeyCommands" hidden="true"/>
  </broadcasterset>

  <vbox orient="vertical">
    <grid>
      <columns>
        <column/>
        <column flex="2"/>
      </columns>
      <rows>
        <row>
          <hbox align="center">
            <label value="&enigmail.keyDetails.userId.label;" control="userId"/>
          </hbox>
          <textbox readonly="true" id="userId" value="?"/>
        </row>
        <row>
          <hbox align="center">
            <label value="&enigmail.keyDetails.keyId.label;" control="keyId"/>
          </hbox>
          <textbox readonly="true" id="keyId" value="?"/>
        </row>
        <row>
          <hbox align="center">
            <label value="&enigmail.keyDetails.keyType.label;" control="keyType"/>
          </hbox>
          <textbox readonly="true" id="keyType" value="?"/>
        </row>
        <row>
          <hbox align="center">
            <label value="&enigmail.keyDetails.calcTrust.label;" control="calcTrust"/>
          </hbox>
          <textbox readonly="true" id="calcTrust" value="?"/>
        </row>
        <row>
          <hbox align="center">
            <label value="&enigmail.keyDetails.ownerTrust.label;" control="ownerTrust"/>
          </hbox>
          <textbox readonly="true" id="ownerTrust" value="?"/>
        </row>
        <row>
          <hbox align="center">
            <label value="&enigmail.keyDetails.fingerprint.label;" control="fingerprint"/>
          </hbox>
          <textbox readonly="true" id="fingerprint" value="?"/>
        </row>
      </rows>
    </grid>
  </vbox>

  <tree id="uidList" flex="2"
        enableColumnDrag="true"
        style="height:100px"
        hidecolumnpicker="true">
    <treecols>
      <treecol label="&enigmail.keyDetails.additionalUid.label;"
               style="width:350px"
               persist="width"/>
      <splitter class="tree-splitter"/>
      <treecol label="&enigmail.valid.label;"
               flex="1"/>
    </treecols>
    <treechildren id="uidListChildren"/>
  </tree>

  <hbox flex="1">
    <tree id="subkeyList" flex="1"
      enableColumnDrag="true"
      style="height:100px"
      hidecolumnpicker="true">

      <treecols>
        <treecol id="subkeyCol" primary="true"
            label="&enigmail.keyDetails.keyPart.label;"
            style="width:71px"
            persist="width"/>
        <splitter class="tree-splitter"/>
        <treecol id="keyTypeCol" style="width:77px"
                 label="&enigmail.keyDetails.ID.label;"
                 persist="width"/>
        <splitter class="tree-splitter"/>
        <treecol id="algoCol" style="width:60px"
                 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:70px"
                 label="&enigmail.keyDetails.created.label;"
                 persist="width"/>
        <splitter class="tree-splitter"/>
        <treecol id="expiryCol" style="width:70px"
                 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 flex="0">
    <button id="actions" label="&enigmail.keyDetails.selAction.label;"
            accesskey="&enigmail.keyDetails.selAction.accesskey;" type="menu">
      <menupopup id="actionPopup">
        <menuitem label="&enigmail.keyMan.ctxViewPhoto.label;" oncommand="showPhoto()" id="showPhoto" disabled="true"/>
        <menuitem label="&enigmail.keyMan.ctxViewSig.label;" oncommand="viewSignatures()"/>
        <menuitem label="&enigmail.keyMan.sign.label;" oncommand="signKey()"/>
        <menuitem label="&enigmail.keyMan.setTrust.label;" oncommand="setOwnerTrust()"/>
        <menuseparator observes="ownKeyCommands" />
        <menuitem label="&enigmail.keyMan.manageUid.label;" observes="ownKeyCommands" oncommand="manageUids()"/>
        <menuitem label="&enigmail.keyMan.changeExpiry.label;" observes="ownKeyCommands" oncommand="changeExpirationDate()"/>
        <menuitem label="&enigmail.keyMan.addPhoto.label;" observes="ownKeyCommands" oncommand="keyDetailsAddPhoto()"/>
        <menuitem label="&enigmail.keyMan.changePwd.label;" observes="ownKeyCommands" oncommand="changePassword()"/>
        <menuitem label="&enigmail.keyMan.revokeKey.label;" observes="ownKeyCommands" oncommand="revokeKey()"/>
        <menuitem label="&enigmail.keyMan.ctxGenRevoke.label;" observes="ownKeyCommands" oncommand="genRevocationCert()"/>
      </menupopup>
    </button>
  </hbox>

</dialog>

