<?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 Ramalingam Saravanan.
 * Portions created by Ramalingam Saravanan <svn@xmlterm.org> are
 * Copyright (C) 2001 Ramalingam Saravanan. All Rights Reserved.
 *
 * Contributor(s):
 * Patrick Brunschwig <patrick@enigmail.net>
 *
 * 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;
]>
<page id="enigmailPrefs"
        headertitle="&enigmail.openpgp.label;"
        xmlns:html="http://www.w3.org/1999/xhtml"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        class="color-dialog"
        orient="vertical"
        onunload="prefSeamonkeyOnClose();"
        onload="initPrefSeamonkey();">

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

  <script type="application/x-javascript">
  <![CDATA[
    // List of persisted elements (required to save prefs)
    var _elementIDs = [
                       "enigmail_agentPath",
                       "enigmail_noPassphrase",
                       "enigmail_maxIdleMinutes",
                       "enigmail_advancedUser"
                       ];
  ]]>
  </script>

  <popupset>
    <tooltip id="neverAsk.tooltip">
        <description>&enigmail.neverAsk.tooltip;</description>
    </tooltip>
    <tooltip id="prefs.overrideGpg.tooltip">
      <description>&enigmail.prefs.overrideGpg.tooltip;</description>
    </tooltip>
    <tooltip id="maxIdleMinutes.tooltip">
      <description>&enigmail.maxIdleMinutes.tooltip;</description>
    </tooltip>
    <tooltip id="userNoPassphrase.tooltip">
      <description>&enigmail.userNoPassphrase.tooltip;</description>
    </tooltip>
    <tooltip id="expertUser.tooltip">
      <description>&enigmail.expertUser.tooltip;</description>
    </tooltip>
    <tooltip id="resetPrefs.tooltip">
      <description>&enigmail.resetPrefs.tooltip;</description>
    </tooltip>
  </popupset>

  <hbox>
    <groupbox orient="vertical" flex="1">
      <caption label="&enigmail.prefs.pathsTitle.label;"/>
      <hbox align="center">
        <label id="enigmailGpgPath" value="(error)"/>
      </hbox>
      <hbox align="center">
        <checkbox label="&enigmail.prefs.overrideGpg.label;"
                  tooltip="prefs.overrideGpg.tooltip"
                  id="enigOverrideGpg"
                  oncommand="enigActivateDependent(this, 'enigmail_agentPath enigmail_browsePath');"/>
        <textbox id="enigmail_agentPath" aria-labelledby="enigOverrideGpg"
                 size="30"
                 pref="true"
                 preftype="string"
                 prefstring="extensions.enigmail.agentPath"/>
        <button id="enigmail_browsePath"
                label="&enigmail.browse.label;"
                oncommand="enigLocateGpg();"/>
      </hbox>
    </groupbox>
  </hbox>
  <hbox>
    <groupbox orient="vertical" flex="1">
      <caption label="&enigmail.passwordSettings.label;"/>
      <hbox autostretch="never" align="center">
        <label control="enigmail_maxIdleMinutes"
                tooltip="maxIdleMinutes.tooltip"
                value="&enigmail.maxIdleMinutesHead.label;" id="maxIdleMinutesHeadLabel"/>

        <textbox id="enigmail_maxIdleMinutes" aria-labelledby="maxIdleMinutesHeadLabel enigmail_maxIdleMinutes maxIdleMinutesTailLabel"
                size="4"
                maxlength="4"
                pref="true"
                preftype="int"
                tooltip="maxIdleMinutes.tooltip"
                prefstring="extensions.enigmail.maxIdleMinutes"/>

        <description tooltip="maxIdleMinutes.tooltip" id="maxIdleMinutesTailLabel">&enigmail.maxIdleMinutesTail.label;</description>
      </hbox>

      <checkbox id="enigmail_noPassphrase"
              label="&enigmail.userNoPassphrase.label;"
              tooltip="userNoPassphrase.tooltip"
              pref="true"
              preftype="bool"
              prefstring="extensions.enigmail.noPassphrase"
              prefattribute="checked"/>

    </groupbox>
  </hbox>

  <separator/>

  <hbox autostretch="never" align="center">
    <hbox autostretch="never" align="center">
      <button id="enigmail_advancedUser"
            label="&enigmail.expertUser.label;"
            oncommand="enigSwitchAdvancedMode(true)"
            tooltip="expertUser.tooltip"/>

      <button id="enigmail_basicUser"
            label="&enigmail.basicUser.label;"
            oncommand="enigSwitchAdvancedMode(false)"
            tooltip="basicUser.tooltip"
            hidden="true"/>
    </hbox>
  </hbox>

  <separator/>
  <vbox autostretch="never" align="end">
    <hbox id="enigmailPrefsBox">
      <button class="dialog"
          id="enigmailPrefs"
          label="&enigmail.advancedPrefsButton.label; ..."
          advanced="true"
          oncommand="EnigPrefWindow(false,'seamonkey')"/>
      <button id="uninstall"
              class="dialog"
              label="&enigmail.uninstallButton.label;"
              oncommand="enigUninstall()"/>
      <button id="resetPrefs"
              label="&enigmail.resetPrefsButton.label;"
              tooltip="resetPrefs.tooltip"
              oncommand="resetPrefs();"/>
    </hbox>
  </vbox>

</page>
