<?xml version="1.0"?>
<!--
    ***** BEGIN LICENSE BLOCK *****
    
    Copyright © 2009 Center for History and New Media
                     George Mason University, Fairfax, Virginia, USA
                     http://zotero.org
    
    This file is part of Zotero.
    
    Zotero is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    Zotero is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.
    
    You should have received a copy of the GNU Affero General Public License
    along with Zotero.  If not, see <http://www.gnu.org/licenses/>.
    
    ***** END LICENSE BLOCK *****
-->


<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/standalone.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
<?xul-overlay href="chrome://zotero/content/zoteroPane.xul"?>
<?xul-overlay href="chrome://zotero/content/itemPane.xul"?>
<?xul-overlay href="chrome://zotero-platform/content/standalone/menuOverlay.xul"?>

<!DOCTYPE window [
	<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> %globalDTD;
	<!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd" > %textcontextDTD;
	<!ENTITY % standaloneDTD SYSTEM "chrome://zotero/locale/standalone.dtd" > %standaloneDTD;
	<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" > %brandDTD;
	<!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd"> %zoteroDTD;
]>

<window id="main-window"
				xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
				windowtype="navigator:browser" 
				title="&brandShortName;"
				width="915" height="500"
				persist="screenX screenY width height sizemode"> 
	<script type="application/javascript" src="standalone.js"/>
	<script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
	<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
	<script type="application/javascript" src="chrome://global/content/inlineSpellCheckUI.js"/>
	
	<commandset id="mainCommandSet">
		<!--FILE-->
		<command id="cmd_quitApplication" oncommand="goQuitApplication();"/>
		<command id="cmd_close" oncommand="window.close();"/>
		
		<!--EDIT-->
		<commandset id="editMenuCommands"/>
		<command id="cmd_find"
			oncommand="document.getElementById('zotero-tb-search').focus();"/>
	</commandset>
	
	<keyset id="mainKeyset">
		<key id="key_close" key="&closeCmd.key;" command="cmd_close" modifiers="accel"/>
	</keyset>
	<keyset id="editMenuKeys"/>
	
	<popup id="contentAreaContextMenu">
		<menuitem id="context-undo"
				label="&undoCmd.label;"
				accesskey="&undoCmd.accesskey;"
				command="cmd_undo"/>
		<menuseparator id="context-sep-undo"/>
		<menuitem id="context-cut"
				label="&cutCmd.label;"
				accesskey="&cutCmd.accesskey;"
				command="cmd_cut"/>
		<menuitem id="context-copy"
				label="&copyCmd.label;"
				accesskey="&copyCmd.accesskey;"
				command="cmd_copy"/>
		<menuitem id="context-paste"
				label="&pasteCmd.label;"
				accesskey="&pasteCmd.accesskey;"
				command="cmd_paste"/>
		<menuitem id="context-delete"
				label="&deleteCmd.label;"
				accesskey="&deleteCmd.accesskey;"
				command="cmd_delete"/>
		<menuseparator id="context-sep-paste"/>
		<menuitem id="context-selectall"
				label="&selectAllCmd.label;"
				accesskey="&selectAllCmd.accesskey;"
				command="cmd_selectAll"/>
	</popup>
	<toolbox id="navigator-toolbox" class="toolbox-top" mode="icons" defaultmode="icons">
		<!-- Menu -->
		<toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
				defaultset="menubar-items"
				mode="icons" iconsize="small" defaulticonsize="small"
				context="toolbar-context-menu">
			<toolbaritem id="menubar-items" align="center">
				<menubar id="main-menubar"
				style="border:0px;padding:0px;margin:0px;-moz-appearance:none">
					<menu id="fileMenu" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
						<menupopup id="menu_FilePopup">
							<menu id="menu_newItem" label="&zotero.toolbar.newItem.label;">
								<menupopup id="menu_NewItemPopup"
										onpopupshowing="ZoteroStandalone.buildNewItemMenu()"/>
							</menu>
							<menuitem id="menu_newNote" label="&zotero.toolbar.newNote;"
									command="cmd_zotero_newStandaloneNote"/>
							<menuitem id="menu_newCollection" label="&zotero.toolbar.newCollection.label;"
									command="cmd_zotero_newCollection"/>
							<menuseparator/>
							<menuitem id="menu_close" label="&closeCmd.label;" key="key_close"
									accesskey="&closeCmd.accesskey;" command="cmd_close"/>
							<menuseparator/>
							<menuitem id="menu_import" label="&zotero.toolbar.import.label;"
									command="cmd_zotero_import"/>
							<menuitem id="menu_importFromClipboard" label="&zotero.toolbar.importFromClipboard;"
									command="cmd_zotero_importFromClipboard"/>
							<menuitem id="menu_exportLibrary" label="&zotero.toolbar.export.label;"
									command="cmd_zotero_exportLibrary"/>
						</menupopup>
					</menu>
					
					<menu id="editMenu" label="&editMenu.label;" accesskey="&editMenu.accesskey;">
						<menupopup id="menu_EditPopup">
							<menuitem id="menu_undo"/>
							<menuitem id="menu_redo"/>
							<menuseparator/>
							<menuitem id="menu_cut"/>
							<menuitem id="menu_copy" label="&copyCmd.label;"
									key="key_copy" accesskey="&copyCmd.accesskey;"
									command="cmd_copy"/>
							<menuitem id="menu_copyCitation" label="&copyCitationCmd.label;"
									command="cmd_zotero_copyCitation"/>
							<menuitem id="menu_copyBibliography" label="&copyBibliographyCmd.label;"
									command="cmd_zotero_copyBibliography"/>
							<menuitem id="menu_paste"/>
							<menuitem id="menu_delete"/>
							<menuseparator/>
							<menuitem id="menu_selectAll"/>
							<menuseparator/>
							<menuitem id="menu_find"/>
							<menuitem id="menu_advancedSearch"
									label="&zotero.toolbar.advancedSearch;"
									command="cmd_zotero_advancedSearch"/>
							<menuseparator hidden="true" id="textfieldDirection-separator"/>
							<menuitem id="textfieldDirection-swap"
									command="cmd_switchTextDirection"
									key="key_switchTextDirection"
									label="&bidiSwitchTextDirectionItem.label;"
									accesskey="&bidiSwitchTextDirectionItem.accesskey;"
									hidden="true"/>
						</menupopup>
					</menu>
					
					<menu id="toolsMenu" label="&toolsMenu.label;" accesskey="&toolsMenu.accesskey;">
						<menupopup id="menu_ToolsPopup">
							<menuitem id="menu_createTimeline" label="&zotero.toolbar.timeline.label;"
									command="cmd_zotero_createTimeline"/>
							<menuitem id="menu_rtfScan" label="&zotero.toolbar.rtfScan.label;"
									command="cmd_zotero_rtfScan"/>
							<menuseparator/>
							<menuitem id="menu_addons" label="&addons.label;"
									oncommand="ZoteroStandalone.openInViewer('chrome://mozapps/content/extensions/extensions.xul')"/>
						</menupopup>
					</menu>
					
					<menu id="windowMenu" />
					
					<menu id="helpMenu"
							label="&helpMenu.label;"
							accesskey="&helpMenu.accesskey;">
						<menupopup id="menu_HelpPopup">
							<menuitem id="menu_openHelp"
									  oncommand="ZoteroStandalone.openHelp();"
									  label="&productHelp.label;"
									  accesskey="&productHelp.accesskey;"
									  key="key_openHelpMac"/>
							<menuitem id="troubleShooting"
									  accesskey="&helpTroubleshootingInfo.accesskey;"
									  label="&helpTroubleshootingInfo.label;"
									  oncommand="ZoteroStandalone.openHelp('troubleshooting');"/>
							<menuitem id="feedbackPage"
									  accesskey="&helpFeedbackPage.accesskey;"
									  label="&helpFeedbackPage.label;"
									  oncommand="ZoteroStandalone.openHelp('feedback');"/>
							<menuseparator/>
							<menuitem id="reportErrors"
									  accesskey="&helpReportErrors.accesskey;"
									  label="&helpReportErrors.label;"
									  command="cmd_zotero_reportErrors"/>
							<menuitem id="checkForUpdates"
									  accesskey="&helpCheckForUpdates.accesskey;"
									  label="&helpCheckForUpdates.label;"
									  oncommand="ZoteroStandalone.checkForUpdates();"/>
							<menuitem id="aboutName"
									  accesskey="&aboutProduct.accesskey;"
									  label="&aboutProduct.label;"
									  oncommand="ZoteroPane.openAboutDialog();"/>
						</menupopup>
					</menu>
				</menubar>
			</toolbaritem>
		</toolbar>
	</toolbox>
	<!--<toolbarpalette/>

	<toolbar id="nav-bar" class="toolbar-primary chromeclass-toolbar"
					 fullscreentoolbar="true" mode="icons" iconsize="large"
					 customizable="true"
					 defaultset="unified-back-forward-button,reload-button,stop-button,home-button,urlbar-container,search-container"
					 context="toolbar-context-menu"/>

	<toolbarset id="customToolbars" context="toolbar-context-menu"/>

	<toolbar id="PersonalToolbar"
					 mode="icons" iconsize="small" defaulticonsize="small"
					 class="chromeclass-directories"
					 context="toolbar-context-menu"
					 defaultset="personal-bookmarks"
					 customizable="true"/>-->
	<hbox flex="1" id="browser">
		<vbox id="appcontent" flex="1">
			<stack id="zotero-pane-stack" fullscreenmode="true" flex="1"/>
		</vbox>
	</hbox>
</window>
