<?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="enigmailPepPref"
        title="&enigmail.pepPref.window.title;"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        xmlns:html="http://www.w3.org/1999/xhtml"
        onload="onLoad();"
        buttons="accept"
        buttonlabelaccept="&enigmail.cardDetails.closeWindow.label;"
        onclick="return contentAreaClick(event);"
        ondialogaccept="onAccept();">

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

  <tabbox flex="1" style="margin:5px" id="prefTabs">
    <tabs id="prefTabBox">
      <tab id="accountTab"    label="&enigmail.pepPref.accountTab.label;"/>
      <tab id="compatTab"     label="&enigmail.pepPref.compatTab.label;"/>
      <tab id="aboutTab"      label="&enigmail.pepPref.aboutTab.label;"/>
    </tabs>

    <tabpanels flex="1" id="prefTabPanel">
      <!-- "Account" Tab -->
      <vbox id="accountTabPanel" flex="1">
        <description class="enigmailTitle">&enigmail.pepPref.accountSecurity.desc;</description>

        <groupbox>
          <label value="&enigmail.pepPref.storeSecurely.title;"/>

          <groupbox>
            <menulist id="selectedAccount" editable="false" oncommand="onSelectAccount(this)"/>
            <checkbox id="trustedServer" label="&enigmail.pepPref.storeSecurely.label;"/>
            <checkbox id="enableEncryption" label="&enigmail.pepPref.enableEncryption.label;"/>
            <checkbox id="passiveMode" label="&enigmail.pepPref.passiveMode.label;"/>
          </groupbox>

          <groupbox>
            <checkbox id="protectedSubject" label="&enigmail.pepPref.protectedSubject.label;"/>
            <checkbox id="warnReply" label="&enigmail.pepPref.warnReducedSecurity.label;"/>
          </groupbox>
        </groupbox>
      </vbox>

      <!-- "Compatibility" Tab -->
      <vbox id="compatTabPanel" flex="1">
        <description class="enigmailTitle">&enigmail.privacyPprefPane.juniorMode;</description>

        <groupbox id="juniorModeGroup">
          <radiogroup id="juniorMode" flex="1">
            <radio id="juniorModeAuto"
                   value="1"
                   label="&enigmail.privacyPprefPane.juniorModeAuto;"
                   oncommand="juniorModeCallback(this);"/>
            <radio id="juniorModeForceOff"
                   value="0"
                   label="&enigmail.privacyPprefPane.juniorModeForceOff;"
                   oncommand="juniorModeCallback(this);"/>
            <radio id="juniorModeForceOn"
                   value="2"
                   label="&enigmail.privacyPprefPane.juniorModeForceOn;"
                   oncommand="juniorModeCallback(this);"/>
          </radiogroup>
        </groupbox>

        <spacer style="min-height: 5px;" flex="0"/>

        <description class="enigmailTitle">&enigmail.pepPref.openpgpCompatibility.label;</description>
        <checkbox id="lookupKeys" label="&enigmail.pepPref.autoKeyLookup.label;"/>

        <spacer style="min-height: 20px;" flex="1"/>

        <hbox align="end">
          <button id="debugLog" label="&enigmail.viewlog.label;" oncommand="EnigmailWindows.openDebugLog()"/>
        </hbox>
      </vbox>

      <!-- "About" Tab -->
      <vbox id="aboutTabPanel" flex="1">

        <hbox flex="1" align="start">
          <vbox>
            <image src="chrome://enigmail/skin/enigmail-logo.png"
              style="height: 117px"
              href="https://enigmail.net"
              class="enigmailLink"/>
          </vbox>
          <separator width="15px"/>
          <image src="chrome://enigmail/skin/pEpLogo.svg"
            style="height: 117px"
            href="https://pep.foundation"
            class="enigmailLink"/>
        </hbox>

        <spacer style="min-height: 8px;" flex="1"/>

        <label class="enigmailTitle" id="enigmailVersion" value="Enigmail/p≡p"/>

        <spacer style="min-height: 5px;" flex="1"/>
        <label value="&enigmail.pepPref.credits.label;:"/>
        <spacer style="height: 5px;"/>

        <description>
          Patrick Brunschwig, Ludwig Hügelschäfer, Robert J. Hansen, Daniele Raffo,<html:br/>
          John Clizbe, Olav Seyfarth, Nico Josuttis, The p≡p Foundation
        </description>

        <spacer style="height: 5px;"/>
        <label value="&enigmail.pepPref.thanksTo.label;:"/>
        <spacer style="height: 5px;"/>

        <grid>
          <columns>
            <column style="min-width:30%;" flex="1"/>
            <column flex="1"/>
          </columns>
          <rows>
            <row>
              <label value="p≡p Foundation"/>
              <label href=">value" value="https://pep.foundation" class="enigmailLink"/>
            </row>
            <row>
              <label value="p≡p Engine"/>
              <label href=">value" value="https://pep.foundation/dev/repos/pEpEngine" class="enigmailLink"/>
            </row>
            <row>
              <label value="p≡p JSON Server"/>
              <label href=">value" value="https://pep.foundation/dev/repos/pEpJSONServerAdapter" class="enigmailLink"/>
            </row>
            <row>
              <label value="GnuPG"/>
              <label href=">value" value="https://www.gnupg.org" class="enigmailLink"/>
            </row>
            <row>
              <label value="Gpg4win"/>
              <label href=">value" value="https://www.gpg4win.org" class="enigmailLink"/>
            </row>
            <row>
              <label value="GpgOSX"/>
              <label href=">value" value="https://sourceforge.net/projects/gpgosx" class="enigmailLink"/>
            </row>
            <row>
              <label value="Sourceforge"/>
              <label href=">value" value="https://sourceforge.net" class="enigmailLink"/>
            </row>
          </rows>
        </grid>

        <spacer style="min-height: 10px;"/>

        <description>&enigmail.about.license;</description>
      </vbox>

    </tabpanels>
  </tabbox>

</dialog>
