www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

hiddenWindow.xul (4204B)


      1 <?xml version="1.0"?>
      2 <!--
      3     ***** BEGIN LICENSE BLOCK *****
      4     
      5     Copyright © 2009 Center for History and New Media
      6                      George Mason University, Fairfax, Virginia, USA
      7                      http://zotero.org
      8     
      9     This file is part of Zotero.
     10     
     11     Zotero is free software: you can redistribute it and/or modify
     12     it under the terms of the GNU Affero General Public License as published by
     13     the Free Software Foundation, either version 3 of the License, or
     14     (at your option) any later version.
     15     
     16     Zotero is distributed in the hope that it will be useful,
     17     but WITHOUT ANY WARRANTY; without even the implied warranty of
     18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     19     GNU Affero General Public License for more details.
     20     
     21     You should have received a copy of the GNU Affero General Public License
     22     along with Zotero.  If not, see <http://www.gnu.org/licenses/>.
     23     
     24     ***** END LICENSE BLOCK *****
     25 -->
     26 
     27 
     28 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
     29 <?xul-overlay href="chrome://zotero-platform/content/standalone/menuOverlay.xul"?>
     30 
     31 <!DOCTYPE window [
     32 	<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> %globalDTD;
     33 	<!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd" > %textcontextDTD;
     34 	<!ENTITY % standaloneDTD SYSTEM "chrome://zotero/locale/standalone.dtd" > %standaloneDTD;
     35 	<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" > %brandDTD;
     36 	<!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd"> %zoteroDTD;
     37 ]>
     38 
     39 <window id="main-window" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
     40 	<script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
     41 	<script>
     42 		// Equivalent to Zotero.openMainWindow()
     43 		function openMainWindow() {
     44 			var prefService = Components.classes["@mozilla.org/preferences-service;1"]
     45 				.getService(Components.interfaces.nsIPrefBranch);
     46 			var chromeURI = prefService.getCharPref('toolkit.defaultChromeURI');
     47 			var flags = prefService.getCharPref("toolkit.defaultChromeFeatures", "chrome,dialog=no,all");
     48 			
     49 			var ww = Components.classes['@mozilla.org/embedcomp/window-watcher;1']
     50 				.getService(Components.interfaces.nsIWindowWatcher);
     51 			ww.openWindow(null, chromeURI, '_blank', flags, null);
     52 		}
     53 		
     54 		function openAbout() {
     55 			var ww = Components.classes['@mozilla.org/embedcomp/window-watcher;1']
     56 				.getService(Components.interfaces.nsIWindowWatcher);
     57 			ww.openWindow(null, 'chrome://zotero/content/about.xul', 'about', 'chrome,dialog=yes', null);
     58 		}
     59 	</script>
     60 	<commandset id="mainCommandSet">
     61 		<command id="cmd_quitApplication" oncommand="goQuitApplication();"/>
     62 		<command id="cmd_close" disabled="true"/>
     63 		<command id="minimizeWindow" disabled="true"/>
     64 		<command id="zoomWindow" disabled="true"/>
     65 		<command id="cmd_mainWindow" oncommand="openMainWindow();"/>
     66 	</commandset>
     67 	
     68 	<keyset id="mainKeyset">
     69 		<key id="key_close" key="&closeCmd.key;" command="cmd_close" modifiers="accel"/>
     70 		<key id="key_mainWindow" key="0" command="cmd_mainWindow" modifiers="accel"/>
     71 	</keyset>
     72 
     73 	<menubar id="main-menubar">
     74 		<menu id="fileMenu" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
     75 			<menupopup id="menu_FilePopup">
     76 				<!-- This gets moved to the Application menu automatically -->
     77 				<menuitem id="aboutName"
     78 					accesskey="&aboutProduct.accesskey;"
     79 					label="&aboutProduct.label;"
     80 					oncommand="openAbout()"/>
     81 
     82 				<!-- Disabled Close line in File menu, just to show something -->
     83                 <menuitem id="menu_close"
     84 					label="&closeCmd.label;"
     85 					key="key_close"
     86 					command="cmd_close"/>
     87 			</menupopup>
     88 		</menu>
     89 	
     90 		<menu id="windowMenu" onpopupshowing="">
     91 			<menupopup>
     92 				<menuitem command="minimizeWindow" key="key_minimizeWindow"/>
     93 				<menuitem command="zoomWindow"/>
     94 				<menuseparator/>
     95 				<menuitem command="cmd_mainWindow" label="Zotero" key="key_mainWindow"/>
     96 				<!--
     97 					Prevent error from macWindowMenuDidShow(), which is called from a built-in
     98 					nWindowMenuShowing(), when opening menu
     99 				-->
    100 				<menuseparator id="sep-window-list" hidden="true"/>
    101 			</menupopup>
    102 		</menu>
    103 	</menubar>
    104 </window>