<?xml version="1.0"?>
<!DOCTYPE window SYSTEM "chrome://livemargins/locale/options.dtd">
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://livemargins/skin/options.css" type="text/css"?>

<prefwindow  id="livemarginsPreferences" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="&optionsTitle;" dlgbuttons="accept,cancel,extra1"    buttonlabelextra1="&restoreDefalut;" ondialogextra1="resetAll();">
		<script type="application/x-javascript" src="chrome://livemargins/content/options.js"/>
		<prefpane id="pane1" label="&optionsTitle;">
		<preferences>
			<preference id="textup" name="extensions.livemargins@mozillaonline.com.textup" type="int"/>
			<preference id="textdown" name="extensions.livemargins@mozillaonline.com.textdown" type="int"/>
			<preference id="linkup" name="extensions.livemargins@mozillaonline.com.linkup" type="int"/>
			<preference id="linkdown" name="extensions.livemargins@mozillaonline.com.linkdown" type="int"/>
			<preference id="closewithfirefox" name="extensions.livemargins@mozillaonline.com.closewithfirefox" type="bool"/>
			<preference id="imagedrag" name="extensions.livemargins@mozillaonline.com.imagedrag" type="bool"/>
            <preference id="injectBaidu" name="extensions.livemargins@mozillaonline.com.injectbaiduapp" type="bool" />
            <preference id="ignoreinput" name="extensions.livemargins@mozillaonline.com.ignoreinput" type="bool" />
            <preference id="showintentmenu" name="extensions.livemargins@mozillaonline.com.showintentmenu" type="bool" />
            <preference id="showpiemenu" name="extensions.livemargins@mozillaonline.com.showpiemenu" type="bool" />
			<preference id="postSnapshotDefaultAction" name="extensions.livemargins@mozillaonline.com.postSnapshotDefaultAction" type="string"/>
		</preferences>
		<script type="text/javascript">
		<![CDATA[
		function resetAll(){
			var prefs = document.getElementsByTagName('preference');
			for(var i= 0; i < prefs.length; i++){
				prefs[i].reset();
			}
		}
		]]>
		</script>
		<tabbox flex="1">
		  <tabs>
			<tab label="&generalOptions;"/>
			<tab label="&textDrag;"/>
			<tab label="&linkDrag;"/>
			<tab label="&imageDrag;"/>
			<tab label="&snapshot;"/>
			<tab label="&others;"/>
		  </tabs>

		  <tabpanels flex="1">
		  	<tabpanel orient="vertical">
			  <groupbox>
				<caption>
				  <label value="&generalOptionsCaption;"/>
				</caption>
				<grid>
				  <columns>
					<column flex="1"/>
					<column/>
				  </columns>
				  <rows>
					<row>
						<checkbox id="checkCloseWithFirefox" label="&closewithFirefox;" preference="closewithfirefox"/>
					</row>
                    <row>
                        <checkbox id="toggleIntentMenu" label="&toggleIntentMenu;" preference="showintentmenu"/>
                    </row>
                    <row>
                        <checkbox id="togglePiemenu" label="&togglePiemenu;" preference="showpiemenu"/>
                    </row>
                    <row>
                        <checkbox id="toggleInputIgnore" label="&toggleInputIgnore;" preference="ignoreinput"/>
                    </row>
				  </rows>
				</grid>
			  </groupbox>
			</tabpanel>
			<tabpanel orient="vertical">
			  <groupbox>
				<caption>
				  <label value="&textDragCaption;"/>
				</caption>
				<grid>
				  <columns>
					<column flex="1"/>
					<column/>
				  </columns>
				  <rows>
					<row>
					  <label value="&upward;"/>
					  <menulist preference="textup">
						<menupopup>
							<menuitem label="&useLMSearch;"  value="0"/>
							<menuitem label="&searchInBackground;"     value="1"/>
							<menuitem label="&searchInForeground;"    value="2"/>
							<menuitem label="&donothing;" 	value="3"/>
						</menupopup>
					  </menulist>
					</row>
					<row>
					  <label value="&downward;"/>
					  <menulist preference="textdown">
						<menupopup>
							<menuitem label="&useLMSearch;"  value="0"/>
							<menuitem label="&searchInBackground;"     value="1"/>
							<menuitem label="&searchInForeground;"    value="2"/>
							<menuitem label="&donothing;" value="3"/>
						</menupopup>
					  </menulist>
					</row>
				  </rows>
				</grid>
			  </groupbox>
			</tabpanel>
			<tabpanel orient="vertical">
			  <groupbox>
				<caption>
				  <label value="&linkDragCaption;"/>
				</caption>
				<grid>
				  <columns>
					<column flex="1"/>
					<column/>
				  </columns>
				  <rows>
					<row>
					  <label value="&upward;"/>
					  <menulist preference="linkup">
						<menupopup>
							<menuitem label="&openLinkBackground;"     value="0"/>
							<menuitem label="&openLinkForeground;"    value="1"/>
							<menuitem label="&donothing;" value="3"/>
						</menupopup>
					  </menulist>
					</row>
					<row>
					  <label value="&downward;"/>
					  <menulist preference="linkdown">
						<menupopup>
							<menuitem label="&openLinkBackground;"     value="0"/>
							<menuitem label="&openLinkForeground;"    value="1"/>
							<menuitem label="&donothing;" value="3"/>
						</menupopup>
					  </menulist>
					</row>
				  </rows>
				</grid>
			  </groupbox>
			</tabpanel>
			<tabpanel orient="vertical">
			  <groupbox>
				<caption>
				  <label value="&imageDragCaption;"/>
				</caption>
				<grid>
				  <columns>
					<column flex="1"/>
					<column/>
				  </columns>
				  <rows>
					<row>
						<checkbox label="&imageDragCheckbox;" preference="imagedrag"/>
					</row>
				  </rows>
				</grid>
			  </groupbox>
			</tabpanel>
			<tabpanel orient="vertical">
  			  <groupbox>
				<caption label="&snapshotOptions;"/>
				<grid>
				  <columns>
					<column flex="1"/>
					<column/>
				  </columns>
				  <rows>
					<row>
					  <label value="&postSnapshotDefault;" control="m-postSnapshotDefault"/>
					  <menulist id="m-postSnapshotDefault" preference="postSnapshotDefaultAction">
						<menupopup>
						  <menuitem label="&postsnap.local;" value="local"/>
						  <menuitem label="&postsnap.editor;" value="editor"/>
						  <!--<menuitem label="&postsnap.xiuxiu;" value="xiuxiu"/>-->
						</menupopup>
					  </menulist>
					</row>
				  </rows>
				</grid>
			  </groupbox>
			</tabpanel>
			<tabpanel orient="vertical">
			  <groupbox>
				<caption>
				  <label value="&othersCaption;"/>
				</caption>
				<grid>
				  <columns>
					<column flex="1"/>
					<column/>
				  </columns>
				  <rows>
					<row>
						<checkbox label="&injectBaiduCheckbox;" preference="injectBaidu"/>
					</row>
				  </rows>
				</grid>
			  </groupbox>
			</tabpanel>
		  </tabpanels>
		</tabbox>
		<hbox id="dialogButtons">
		  <button dlgtype="extra1" id="myDefault" />
		  <spacer flex="1" />
		  <button dlgtype="accept" id="myAccept" />
		  <button dlgtype="cancel" id="myCancel" />
		</hbox>
	</prefpane>	
</prefwindow>
