<?xml version="1.0"?>

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://scrapbook/skin/prefs.css" type="text/css"?>
<?xml-stylesheet href="chrome://mozapps/content/preferences/preferences.css"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>

<!DOCTYPE prefwindow [
	<!ENTITY % mainDTD SYSTEM "chrome://scrapbook/locale/scrapbook.dtd">
	%mainDTD;
	<!ENTITY % treeDTD SYSTEM "chrome://scrapbook/locale/tree.dtd">
	%treeDTD;
	<!ENTITY % prefDTD SYSTEM "chrome://scrapbook/locale/prefs.dtd">
	%prefDTD;
	<!ENTITY % editDTD SYSTEM "chrome://scrapbook/locale/editor.dtd">
	%editDTD;
	<!ENTITY % overlayDTD SYSTEM "chrome://scrapbook/locale/overlay.dtd">
	%overlayDTD;
]>

<prefwindow id="sbPrefWindow"
            xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
            title="ScrapBook &sb.tools.options;"
            style="width: 40em;"
            onload="sbPrefWindow.init();">

	<prefpane id="mainPane" label="&sb.prefs.main;" flex="1">
		<preferences>
			<preference id="scrapbook.ui.contextMenu"    name="scrapbook.ui.contextMenu"    type="bool" />
			<preference id="scrapbook.ui.contextSubMenu" name="scrapbook.ui.contextSubMenu" type="bool" />
			<preference id="scrapbook.ui.folderList.maxEntries" name="scrapbook.ui.folderList.maxEntries" type="int" />
			<preference id="scrapbook.ui.bookmarkMenu"   name="scrapbook.ui.bookmarkMenu"   type="bool" />
			<preference id="scrapbook.ui.menuBar"        name="scrapbook.ui.menuBar"        type="bool" />
			<preference id="scrapbook.ui.toolsMenu"      name="scrapbook.ui.toolsMenu"      type="bool" />
			<preference id="scrapbook.ui.statusBar"      name="scrapbook.ui.statusBar"      type="bool" />
		</preferences>
		<checkbox preference="scrapbook.ui.contextMenu"    label="&sb.prefs.ui.contextMenu;"
		          onsyncfrompreference="sbPrefWindow.updateGroupedUI('scrapbook.ui.contextMenu', 'contextmenu');" />
		<checkbox preference="scrapbook.ui.contextSubMenu" label="&sb.prefs.ui.contextSubMenu; *" class="indent" group="contextmenu" />
		<checkbox preference="scrapbook.ui.bookmarkMenu"   label="&sb.prefs.ui.bookmark;" class="indent" group="contextmenu" />
		<hbox align="center">
			<label value="&sb.prefs.ui.folderList.maxEntries.1;" class="indent" />
			<textbox preference="scrapbook.ui.folderList.maxEntries" type="number" size="2" max="99" />
			<label value="&sb.prefs.ui.folderList.maxEntries.2;" />
		</hbox>
		<checkbox preference="scrapbook.ui.menuBar"        label="&sb.prefs.ui.menuBar;"
		          onsyncfrompreference="sbPrefWindow.updateGroupedUI('scrapbook.ui.menuBar', 'menubar');" />
		<checkbox preference="scrapbook.ui.toolsMenu" label="&sb.prefs.ui.toolsMenu;" />
		<checkbox preference="scrapbook.ui.statusBar" label="&sb.prefs.ui.statusBar;" />
	</prefpane>

	<prefpane id="keysPane" label="&sb.prefs.keys;" flex="1">
		<preferences>
			<preference id="scrapbook.key.menubar"     name="scrapbook.key.menubar"     type="string" />
			<preference id="scrapbook.key.sidebar"     name="scrapbook.key.sidebar"     type="string" />
			<preference id="scrapbook.key.save"        name="scrapbook.key.save"        type="string" />
			<preference id="scrapbook.key.saveAs"      name="scrapbook.key.saveAs"      type="string" />
			<preference id="scrapbook.key.saveAllTabs" name="scrapbook.key.saveAllTabs" type="string" />
			<preference id="scrapbook.key.bookmark"    name="scrapbook.key.bookmark"    type="string" />
		</preferences>
		<grid>
			<columns>
				<column />
				<column flex="1" />
			</columns>
			<rows oninput="sbPrefWindow.onInputKey(event);">
				<row id="sbKeysMenubar" align="center">
					<label value="&sb.menubar;:" group="menubar" />
					<hbox align="center">
						<label value="Alt+" group="menubar" />
						<textbox size="1" maxlength="1" preference="scrapbook.key.menubar" group="menubar" />
					</hbox>
				</row>
				<row align="center">
					<label value="&sb.sidebar;:" />
					<hbox align="center">
						<label value="Alt+" />
						<textbox size="1" maxlength="1" preference="scrapbook.key.sidebar" />
					</hbox>
				</row>
				<row align="center">
					<label value="&sb.save.entire;:" />
					<hbox align="center">
						<label value="Ctrl+Shift+" />
						<textbox size="1" maxlength="1" preference="scrapbook.key.save" />
					</hbox>
				</row>
				<row align="center">
					<label value="&sb.save.entire.as;:" />
					<hbox align="center">
						<label value="Ctrl+Shift+" />
						<textbox size="1" maxlength="1" preference="scrapbook.key.saveAs" />
					</hbox>
				</row>
				<row align="center">
					<label value="&sb.save.alltabs;:" />
					<hbox align="center">
						<label value="Ctrl+Shift+" />
						<textbox size="1" maxlength="1" preference="scrapbook.key.saveAllTabs" />
					</hbox>
				</row>
				<row align="center">
					<label value="&sb.save.bookmark;:" />
					<hbox align="center">
						<label value="Ctrl+Shift+" />
						<textbox size="1" maxlength="1" preference="scrapbook.key.bookmark" />
					</hbox>
				</row>
			</rows>
		</grid>
		<description style="margin-top: 1em;">&sb.prefs.restart;</description>
	</prefpane>

	<prefpane id="tabsPane" label="&sb.prefs.tabs;" flex="1">
		<preferences>
			<preference id="scrapbook.tabs.open"         name="scrapbook.tabs.open"         type="bool" />
			<preference id="scrapbook.tabs.openSource"   name="scrapbook.tabs.openSource"   type="bool" />
			<preference id="scrapbook.tabs.combinedView" name="scrapbook.tabs.combinedView" type="bool" />
			<preference id="scrapbook.tabs.searchResult" name="scrapbook.tabs.searchResult" type="bool" />
			<preference id="scrapbook.tabs.note"         name="scrapbook.tabs.note"         type="bool" />
		</preferences>
		<description value="&sb.prefs.tabs.tips;:" />
		<checkbox preference="scrapbook.tabs.open"         label="&sb.open;" />
		<checkbox preference="scrapbook.tabs.openSource"   label="&sb.open.source;" />
		<checkbox preference="scrapbook.tabs.combinedView" label="&sb.folder.combine;" />
		<checkbox preference="scrapbook.tabs.searchResult" label="&sb.search.fulltext;" />
		<checkbox preference="scrapbook.tabs.note"         label="&sb.prefs.tabs.note;" />
	</prefpane>

	<prefpane id="editPane" label="&sb.prefs.edit;" flex="1">
		<groupbox>
			<caption label="&sb.highlighter;" />
			<hbox id="hlTemplate" align="center">
				<label />
				<label value="Firefox, rediscover the web" />
				<spacer flex="1" />
				<button label="&sb.button.customize;..." hlumber="0"
				        oncommand="sbPrefWindow.hlCustomize(this.getAttribute('hlnumber'));" />
			</hbox>
		</groupbox>
	</prefpane>

	<prefpane id="organizePane" label="&sb.prefs.organize;" flex="1">
		<preferences>
			<preference id="scrapbook.data.default"      name="scrapbook.data.default"      type="bool" />
			<preference id="scrapbook.data.path"         name="scrapbook.data.path"         type="file" />
			<preference id="scrapbook.multibook.enabled" name="scrapbook.multibook.enabled" type="bool" />
			<preference id="scrapbook.confirmDelete"     name="scrapbook.confirmDelete"     type="bool" />
			<preference id="scrapbook.tree.autoCollapse" name="scrapbook.tree.autoCollapse" type="bool" />
			<preference id="scrapbook.tree.unshift"      name="scrapbook.tree.unshift"      type="bool" />
		</preferences>
		<groupbox>
			<caption id="sbDataCaption" label="&sb.prefs.data;" />
			<radiogroup id="sbDataDefault"
			            preference="scrapbook.data.default"
			            onsyncfrompreference="sbPrefWindow.updateDataUI();">
				<radio label="&sb.prefs.data.default;" value="true" />
				<hbox>
					<radio label="&sb.prefs.data.custom;" value="false" />
					<filefield id="sbDataPath" flex="1" />
					<button id="sbDataButton"
					        label="&sb.button.browse;..." label2="&sb.prefs.data.tips;"
					        oncommand="sbPrefWindow.selectFolder(this.getAttribute('label2'));" />
				</hbox>
			</radiogroup>
			<separator />
			<checkbox id="sbMultiBookEnabled"
			          preference="scrapbook.multibook.enabled"
			          label="&sb.prefs.multibook.enabled;"
			          onsyncfrompreference="sbPrefWindow.updateDataUI();" />
			<description class="indent">&sb.prefs.multibook.tips;</description>
		</groupbox>
		<checkbox preference="scrapbook.confirmDelete"     label="&sb.prefs.confirmDelete;" />
		<checkbox preference="scrapbook.tree.autoCollapse" label="&sb.prefs.tree.autoCollapse;" />
		<hbox align="center">
			<label value="&sb.prefs.tree.unshift;" />
			<menulist preference="scrapbook.tree.unshift">
				<menupopup>
					<menuitem value="true"  label="&sb.prefs.tree.unshift.top;" />
					<menuitem value="false" label="&sb.prefs.tree.unshift.bottom;" />
				</menupopup>
			</menulist>
		</hbox>
		<spacer flex="1" height="50" />
	</prefpane>

	<prefpane id="advancedPane" label="&sb.prefs.advanced;" flex="1">
		<preferences>
			<preference id="scrapbook.showDetailOnDrop"   name="scrapbook.showDetailOnDrop"   type="bool" />
			<preference id="scrapbook.notifyOnComplete"   name="scrapbook.notifyOnComplete"   type="bool" />
		</preferences>
		<checkbox preference="scrapbook.showDetailOnDrop" label="&sb.prefs.showDetailOnDrop;" />
		<checkbox preference="scrapbook.notifyOnComplete" label="&sb.prefs.notifyOnComplete;" />
	</prefpane>

	<script type="application/x-javascript" src="chrome://scrapbook/content/common.js" />
	<script type="application/x-javascript" src="chrome://scrapbook/content/prefs.js" />
	<script type="application/x-javascript" src="chrome://scrapbook/content/highlighter.js" />
	<script type="application/x-javascript" src="chrome://scrapbook/content/mbService.js" />

</prefwindow>
