<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/global.css"?>
<?xml-stylesheet href="chrome://ssleuth/skin/ssleuth.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://ssleuth/locale/preferences.dtd">
<page id="ssleuth-preferences" 
							xmlns:html="http://www.w3.org/1999/xhtml"
							xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 
							title="&ssleuth.pref.title.label;"
							onload="">
	<script type="application/javascript"
				  src="chrome://ssleuth/content/preferences-ui.js"/>

	<hbox align="center" 
				style="margin-bottom: 50px;"/>
	<hbox flex="1" id="ssleuth-pref-contentbox">
		<listbox id="ssleuth-pref-categories"
						selectedIndex = "0"
						onselect="document.getElementById('viewport-panel').selectedIndex
												= this.selectedIndex">
			<listitem class="ssleuth-pref-category"
					image=""
					label="&ssleuth.pref.tab.ssleuthui;"
					selected="true"/>
			<listitem class="ssleuth-pref-category"
					image=""
					label="&ssleuth.pref.tab.ranking;"/>
			<listitem class="ssleuth-pref-category"
					image=""
					label="&ssleuth.pref.tab.ciphersuites;"/>
			<listitem class="ssleuth-pref-category"
					image=""
					label="&ssleuth.pref.tab.about;"/>
		</listbox>

		<box flex="1" class="ssleuth-pref-main-content">
			<deck flex="1" id="viewport-panel">
				<scrollbox id="ssleuth-pref-scroll-box" 
										flex="1" orient="vertical" tabindex="0"
										active="true">
				<vbox class="ssleuth-pref-view-container">
					<groupbox>
						<caption label="&ssleuth.pref.ui.notifier.label;"/>
						<radiogroup id="ssleuth-pref-notifier-location" 
							orient="horizontal">
							<radio id="ssleuth-notifier-urlbar" 
									label="&ssleuth.pref.ui.notifier.urlbar;"
									value="0"/>
							<radio id="ssleuth-notifier-toolbar"
									label="&ssleuth.pref.ui.notifier.toolbar;"
									value="1"/>
						</radiogroup>
					</groupbox>
					<groupbox>
						<caption label="&ssleuth.pref.ui.fontsize;"/>
						<radiogroup id="ssleuth-pref-panel-fontsize"
							orient="horizontal"
							oncommand="">
							<hbox align="baseline">
								<radio id="ssleuth-panel-fontsize-small" 
										value="0" 
										label="&ssleuth.pref.ui.fontsize.default;"/>
								<hbox style="background-color:-moz-dialog" align="baseline">
									<label value="&ssleuth.pref.ui.fontsize.header;"
													control="ssleuth-panel-fontsize-small"
													class="ssleuth-text-title-small"/>
									<label value="&ssleuth.pref.ui.fontsize.body;"
													control="ssleuth-panel-fontsize-small"
													class="ssleuth-text-body-small"/>
								</hbox>
							</hbox>
							<hbox align="baseline">
								<radio id="ssleuth-panel-fontsize-medium" 
										value="1" 
										style="margin-left: 15px;"
										label="&ssleuth.pref.ui.fontsize.medium;"/>
								<hbox style="background-color:-moz-dialog" align="baseline">
									<label value="&ssleuth.pref.ui.fontsize.header;"
													control="ssleuth-panel-fontsize-medium"
													class="ssleuth-text-title-medium"/>
									<label value="&ssleuth.pref.ui.fontsize.body;"
													control="ssleuth-panel-fontsize-medium"
													class="ssleuth-text-body-medium"/>
								</hbox>
							</hbox>
							<hbox align="baseline">
								<radio id="ssleuth-panel-fontsize-large"
										value="2"
										style="margin-left: 15px;"
										label="&ssleuth.pref.ui.fontsize.large;"/>
								<hbox style="background-color:-moz-dialog" align="baseline">
									<label value="&ssleuth.pref.ui.fontsize.header;"
													control="ssleuth-panel-fontsize-large"
													class="ssleuth-text-title-large"/>
									<label value="&ssleuth.pref.ui.fontsize.body;"
													control="ssleuth-panel-fontsize-large"
													class="ssleuth-text-body-large"/>
								</hbox>
							</hbox>
						</radiogroup>
					</groupbox>
					<groupbox>
							<caption label="&ssleuth.pref.panel.panelinfo;"/>
							<checkbox id="ssleuth-pref-show-cs-key-exchange"
									label="&ssleuth.pref.panel.ciphersuite; &ssleuth.pref.panel.keyexchange;"/>
							<checkbox id="ssleuth-pref-show-cs-authentication"
									label="&ssleuth.pref.panel.ciphersuite; &ssleuth.pref.panel.authentication;"/>
							<checkbox id="ssleuth-pref-show-cs-bulk-cipher"
									label="&ssleuth.pref.panel.ciphersuite; &ssleuth.pref.panel.bulkcipher;"/>
							<checkbox id="ssleuth-pref-show-cs-hmac"
									label="&ssleuth.pref.panel.ciphersuite; &ssleuth.pref.panel.hmac;"/>

							<checkbox id="ssleuth-pref-show-cert-validity"
									label="&ssleuth.pref.panel.certificate; &ssleuth.pref.panel.validity;"/>
							<checkbox id="ssleuth-pref-show-cert-validity-time"
									label="&ssleuth.pref.panel.certificate; &ssleuth.pref.panel.validitytime;"/>
							<checkbox id="ssleuth-pref-show-cert-fingerprint"
									label="&ssleuth.pref.panel.certificate; &ssleuth.pref.panel.fingerprint;"/>
							<!-- checkbox id="ssleuth-pref-show-urlbar-icon"
									label="Certificate : Show icon in URL bar notifier"/-->
							<hbox>
								<button label="&ssleuth.pref.ui.button.reset;" 
												id="ssleuth-pref-show-panel-info-reset"/>
							</hbox>
					</groupbox>
					<groupbox>
						<caption label="&ssleuth.pref.ui.urlbar;"/>
            <checkbox id="ssleuth-pref-show-urlbar-gradient"
                label="&ssleuth.pref.ui.urlbar.colorize;" />
            <checkbox id="ssleuth-pref-show-notifier-gradient"
                label="&ssleuth.pref.ui.notifier.colorize;" />
 					</groupbox>

					</vbox>
				</scrollbox>

				<scrollbox id="ssleuth-pref-scroll-box" 
										flex="1" orient="vertical" tabindex="0"
										active="true">
				<vbox class="ssleuth-pref-view-container">
					<groupbox>
						<caption label="&ssleuth.pref.rating.overall;"/>
						<description value="&ssleuth.pref.rating.overall.desc;"/> 
						<vbox align="baseline">
							<grid equalsize="always" align="baseline"
										style="background-color:-moz-dialog; height: 2.0em;">
								<columns equalsize='always'>
									<column flex='1'/>
									<column flex='1'/>
									<column flex='1'/>
									<column flex='1'/>
									<column flex='1'/>
									<column flex='1'/>
									<column flex='1'/>
								</columns>
								<rows>
									<row>
										<label value="&ssleuth.pref.rating.ciphersuite;" flex="1"/>
										<label value="&ssleuth.pref.rating.forwardsecrecy;" flex="1"/>
										<label value="&ssleuth.pref.rating.extendedvalidation;" flex="1"/>
										<label value="&ssleuth.pref.rating.connectionstatus;" flex="1"/>
										<label value="&ssleuth.pref.rating.certstate;" flex="1"/>
										<label value="&ssleuth.pref.rating.signaturealg;" flex="1"/>
										<label value="&ssleuth.pref.rating.total;" flex="1"/>
									</row>
									<row align='baseline'>
										<box flex="1">
											<textbox width="50" type="number" 
												id="ssleuth-pref-cipher-suite-weight" decimalplaces="1"/>
										</box>
										<box flex="1">
											<textbox width="50" type="number" 
												id="ssleuth-pref-pfs-weight" decimalplaces="1"/>
										</box>
										<box flex="1">
											<textbox width="50" type="number" 
												id="ssleuth-pref-ev-weight" decimalplaces="1"/>
										</box>
										<box flex="1">
											<textbox width="50" type="number" 
												id="ssleuth-pref-ffstatus-weight" decimalplaces="1"/>
										</box>
										<box flex="1">
											<textbox width="50" type="number" 
												id="ssleuth-pref-certstate-weight" decimalplaces="1"/>
										</box>
										<box flex="1">
											<textbox width="50" type="number" 
												id="ssleuth-pref-signature-weight" decimalplaces="1"/>
										</box>
										<label flex="1" id="ssleuth-pref-cx-rating-total" style="font-weight:bold"/>
									</row>
								</rows>
							</grid>
							<description value=""/>
							<hbox>
								<button label="&ssleuth.pref.ui.button.apply;" 
												id="ssleuth-pref-cx-ratings-apply"
												/>
								<button label="&ssleuth.pref.ui.button.reset;"
												id="ssleuth-pref-cx-ratings-reset"
												/>
							</hbox>
					</vbox>
				</groupbox>
				<description value=""/>

				<groupbox>
					<caption label="&ssleuth.pref.rating.ciphersuite;"/>
					<description value="&ssleuth.pref.rating.ciphersuite.desc;"/> 
					<vbox align="baseline">
						<grid equalsize="always" align="baseline"
									style="background-color:-moz-dialog; height: 2.0em;">
							<columns equalsize='always'>
								<column flex='1'/>
								<column flex='1'/>
								<column flex='1'/>
								<column flex='1'/>
							</columns>
							<rows>
								<row>
									<label value="&ssleuth.pref.rating.keyexchange;" flex="1"/>
									<label value="&ssleuth.pref.rating.bulkcipher;" flex="1"/>
									<label value="&ssleuth.pref.rating.hmac;" flex="1"/>
									<label value="&ssleuth.pref.rating.total;" flex="1"/>
								</row>
								<row align='baseline'>
									<box flex="1">
										<textbox width="50" type="number" 
											id="ssleuth-pref-cs-kx-weight" decimalplaces="1"/>
									</box>
									<box flex="1">
										<textbox width="50" type="number" 
											id="ssleuth-pref-cs-cipher-weight" decimalplaces="1"/>
									</box>
									<box flex="1">
										<textbox width="50" type="number" 
											id="ssleuth-pref-cs-hmac-weight" decimalplaces="1"/>
									</box>
									<label flex="1" id="ssleuth-pref-cs-rating-total" style="font-weight:bold;"/>
								</row>
							</rows>
						</grid>
						<description value=""/>
					</vbox>

					<hbox>
						<button label="&ssleuth.pref.ui.button.apply;"
										id="ssleuth-pref-cs-ratings-apply"
										/>
						<button label="&ssleuth.pref.ui.button.reset;"
										id="ssleuth-pref-cs-ratings-reset"
										/>
					</hbox>

					<description value=""/>
				</groupbox>
				</vbox>
				</scrollbox>

				<scrollbox id="ssleuth-pref-scroll-box" 
										flex="1" orient="vertical" tabindex="0"
										active="true">
				<vbox class="ssleuth-pref-view-container">

					<groupbox>
						<caption label="&ssleuth.pref.ciphersuites.title;"/>
						<description value="&ssleuth.pref.ciphersuites.desc1;"/>
						<description value="&ssleuth.pref.ciphersuites.desc2;" />

						<hbox flex="1">
							<richlistbox id="ssleuth-pref-mng-cs-entrybox" flex="1">
								<listheader equalsize="always" id="ssleuth-pref-mng-cs-header"
										style="border: 0; padding: 0; -moz-appearance: none;">
									<treecol label="&ssleuth.pref.ciphersuites.name;" flex="1"/>
									<treecol label="&ssleuth.pref.ciphersuites.state;" flex="1"/>
								</listheader>
							</richlistbox>

							<vbox flex="1">
								<deck id="ssleuth-pref-mng-cs-deck" flex="1"/>	
							</vbox>
						</hbox>

						<hbox>
							<hbox>
								<button label="&ssleuth.pref.ui.button.new;" 
												id="ssleuth-pref-mng-cs-entry-new"
												/>
								<button label="&ssleuth.pref.ui.button.edit;" 
												id="ssleuth-pref-mng-cs-entry-edit"
												/>
								<button label="&ssleuth.pref.ui.button.remove;" 
												id="ssleuth-pref-mng-cs-entry-remove"
												/>
							</hbox>
							<hbox id="ssleuth-pref-mng-cs-edit-buttons" hidden="true">
								<button label="&ssleuth.pref.ui.button.apply;"
												id="ssleuth-pref-mng-cs-edit-apply"
												/>
								<button label="&ssleuth.pref.ui.button.cancel;"
												id="ssleuth-pref-mng-cs-edit-cancel"
												/>
							</hbox>
						</hbox>
					</groupbox>
					<groupbox>
						<caption label="&ssleuth.pref.ciphersuites.note.title;"/>
						<label class="text-link" 
														href="https://github.com/sibiantony/ssleuth/wiki/Cipher-suites-enabling-and-disabling"
														value="&ssleuth.pref.ciphersuites.wiki;"/>
						<html:ul>
							<html:li>&ssleuth.pref.ciphersuites.note.1;</html:li>
							<html:li>&ssleuth.pref.ciphersuites.note.2;</html:li>
							<html:li>&ssleuth.pref.ciphersuites.note.3;</html:li>
							<html:li>&ssleuth.pref.ciphersuites.note.4;</html:li>
							<html:li>&ssleuth.pref.ciphersuites.note.5;</html:li>
							<html:li>&ssleuth.pref.ciphersuites.note.6;</html:li>
						</html:ul>

						<description value="&ssleuth.pref.ciphersuites.note.restore;"/>
						<hbox>
							<button label="&ssleuth.pref.ui.button.restore;" 
											id="ssleuth-pref-mng-cs-entry-restore-default"
											/>
						</hbox>

					</groupbox>

					<groupbox>
						<caption label="&ssleuth.pref.ciphersuites.reset.title;"/>
						<description value="&ssleuth.pref.ciphersuites.reset.desc;"/>
						<hbox>
							<button label="&ssleuth.pref.ui.button.resetall;"
											id="ssleuth-pref-cs-reset-all-cs"/>
						</hbox>
					</groupbox>
		
				</vbox>
				</scrollbox>

				<scrollbox id="ssleuth-pref-scroll-box" 
										flex="1" orient="vertical" tabindex="0"
										active="true">
				<vbox class="ssleuth-pref-view-container">
					<groupbox>
						<caption label="SSleuth v0.5.1"/>
						<description value="&ssleuth.pref.about.author; Sibi Antony"/>
						<description class="ssleuth-pref-text" >
								Your feedback and development/translation support are welcome.
								See the project page for more details.
						</description>
						<label class="text-link" 
														href="https://github.com/sibiantony/ssleuth"
														value="https://github.com/sibiantony/ssleuth"/>
					</groupbox>
					<groupbox>
						<caption label='&ssleuth.pref.about.thanks;' />
							<description value=' • John Souvestre (beta tests, v0.3.1)'/>
							<description value='&ssleuth.pref.about.translations;'/>
							<description value=' • Jei Four (de-DE)' />
							<description value=' • Thomas PORTASSAU (fr-FR) 0.4.x' />
							<description value=' • devmapper0 (pl-PL)' />
					</groupbox>

					<groupbox>
						<caption label="&ssleuth.pref.about.license;"/>
						<description class="ssleuth-pref-text">
							SSleuth is free software: You can redistribute it and/or modify 
							it under the terms of the GNU General Public License as published by 
							the Free Software Foundation, either version 3 of the License, or 
							(at your option) any later version.
						</description>

						<description class="ssleuth-pref-text">
							This software is distributed in the hope that it will be useful, 
							but WITHOUT ANY WARRANTY. See the GNU General Public License for more details.
						</description>

						<description value=""/>

						<description class="ssleuth-pref-text">
							Jdenticon 1.3.2 zlib license, jdenticon.com (c) Daniel Mester Pirttijärvi
						</description>


					</groupbox>
				</vbox>
				</scrollbox>
				<!-- Template 
						<scrollbox id="ssleuth-pref-scroll-box" 
										flex="1" orient="vertical" tabindex="0"
										active="true">
				<vbox class="ssleuth-pref-view-container">

				</vbox>
				</scrollbox-->
			</deck>
		</box>
	</hbox>
</page>
