2007-03-22 10:30:00 -07:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
# -*- Mode: HTML -*-
|
|
|
|
#
|
2012-05-21 04:12:37 -07:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
2007-07-17 14:08:24 -07:00
|
|
|
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
|
|
|
|
<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
|
|
|
|
<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
|
|
|
|
|
|
|
|
# All DTD information is stored in a separate file so that it can be shared by
|
|
|
|
# hiddenWindow.xul.
|
|
|
|
#include browser-doctype.inc
|
|
|
|
|
|
|
|
<overlay id="hidden-overlay"
|
|
|
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
|
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
|
|
|
|
|
|
|
# All JS files which are not content (only) dependent that browser.xul
|
|
|
|
# wishes to include *must* go into the global-scripts.inc file
|
|
|
|
# so that they can be shared by this overlay.
|
|
|
|
#include global-scripts.inc
|
|
|
|
|
2009-11-05 05:53:26 -08:00
|
|
|
<script type="application/javascript">
|
2012-12-03 20:20:23 -08:00
|
|
|
function OpenBrowserWindowFromDockMenu(options) {
|
|
|
|
let win = OpenBrowserWindow(options);
|
2012-08-07 12:28:16 -07:00
|
|
|
win.addEventListener("load", function listener() {
|
|
|
|
win.removeEventListener("load", listener);
|
|
|
|
let dockSupport = Cc["@mozilla.org/widget/macdocksupport;1"]
|
|
|
|
.getService(Ci.nsIMacDockSupport);
|
|
|
|
dockSupport.activateApplication(true);
|
|
|
|
});
|
|
|
|
|
|
|
|
return win;
|
2010-03-04 16:10:42 -08:00
|
|
|
}
|
|
|
|
|
2012-06-15 12:09:48 -07:00
|
|
|
addEventListener("load", function() { gBrowserInit.nonBrowserWindowStartup() }, false);
|
|
|
|
addEventListener("unload", function() { gBrowserInit.nonBrowserWindowShutdown() }, false);
|
2007-03-22 10:30:00 -07:00
|
|
|
</script>
|
|
|
|
|
|
|
|
# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the
|
|
|
|
# browser-sets.inc file for sharing with hiddenWindow.xul.
|
|
|
|
#include browser-sets.inc
|
|
|
|
|
|
|
|
# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by
|
|
|
|
# hiddenWindow.xul.
|
|
|
|
#include browser-menubar.inc
|
|
|
|
|
2010-02-22 12:51:30 -08:00
|
|
|
<!-- Dock menu -->
|
|
|
|
<popupset>
|
|
|
|
<menupopup id="menu_mac_dockmenu">
|
2010-03-04 16:10:42 -08:00
|
|
|
<!-- The command cannot be cmd_newNavigator because we need to activate
|
|
|
|
the application. -->
|
2013-04-08 08:30:50 -07:00
|
|
|
<menuitem label="&newNavigatorCmd.label;" oncommand="OpenBrowserWindowFromDockMenu();"
|
|
|
|
id="macDockMenuNewWindow" />
|
2012-12-03 20:20:23 -08:00
|
|
|
<menuitem label="&newPrivateWindow.label;" oncommand="OpenBrowserWindowFromDockMenu({private: true});" />
|
2010-02-22 12:51:30 -08:00
|
|
|
</menupopup>
|
|
|
|
</popupset>
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
</overlay>
|