|
1 <?xml version="1.0"?> |
|
2 # -*- Mode: HTML -*- |
|
3 # |
|
4 # This Source Code Form is subject to the terms of the Mozilla Public |
|
5 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
7 |
|
8 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> |
|
9 <?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?> |
|
10 |
|
11 <?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?> |
|
12 <?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?> |
|
13 <?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?> |
|
14 |
|
15 # All DTD information is stored in a separate file so that it can be shared by |
|
16 # hiddenWindow.xul. |
|
17 #include browser-doctype.inc |
|
18 |
|
19 <overlay id="hidden-overlay" |
|
20 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
|
21 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
|
22 |
|
23 # All JS files which are not content (only) dependent that browser.xul |
|
24 # wishes to include *must* go into the global-scripts.inc file |
|
25 # so that they can be shared by this overlay. |
|
26 #include global-scripts.inc |
|
27 |
|
28 <script type="application/javascript"> |
|
29 function OpenBrowserWindowFromDockMenu(options) { |
|
30 let win = OpenBrowserWindow(options); |
|
31 win.addEventListener("load", function listener() { |
|
32 win.removeEventListener("load", listener); |
|
33 let dockSupport = Cc["@mozilla.org/widget/macdocksupport;1"] |
|
34 .getService(Ci.nsIMacDockSupport); |
|
35 dockSupport.activateApplication(true); |
|
36 }); |
|
37 |
|
38 return win; |
|
39 } |
|
40 |
|
41 addEventListener("load", function() { gBrowserInit.nonBrowserWindowStartup() }, false); |
|
42 addEventListener("unload", function() { gBrowserInit.nonBrowserWindowShutdown() }, false); |
|
43 </script> |
|
44 |
|
45 # All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the |
|
46 # browser-sets.inc file for sharing with hiddenWindow.xul. |
|
47 #include browser-sets.inc |
|
48 |
|
49 # The entire main menubar is placed into browser-menubar.inc, so that it can be shared by |
|
50 # hiddenWindow.xul. |
|
51 #include browser-menubar.inc |
|
52 |
|
53 <!-- Dock menu --> |
|
54 <popupset> |
|
55 <menupopup id="menu_mac_dockmenu"> |
|
56 <!-- The command cannot be cmd_newNavigator because we need to activate |
|
57 the application. --> |
|
58 <menuitem label="&newNavigatorCmd.label;" oncommand="OpenBrowserWindowFromDockMenu();" |
|
59 id="macDockMenuNewWindow" /> |
|
60 <menuitem label="&newPrivateWindow.label;" oncommand="OpenBrowserWindowFromDockMenu({private: true});" /> |
|
61 </menupopup> |
|
62 </popupset> |
|
63 |
|
64 </overlay> |