Bug 1471734 - Remove FULL_BROWSER_WINDOW preprocessor directive;r=Gijs
The key used to be removed from the markup. This changes it to include
the <key> but instead disable it through the related command, which fits
the pattern used with other commands.
MozReview-Commit-ID: LPuwULDt22W
--- a/browser/base/content/browser-sets.inc
+++ b/browser/base/content/browser-sets.inc
@@ -360,19 +360,17 @@
# On OS X, dark voodoo magic invokes the quit code for this key.
# So we're not adding the attribute on OSX because of backwards/add-on compat.
# See bug 1369909 for background on this.
#ifndef XP_MACOSX
command="cmd_quitApplication"
#endif
reserved="true"/>
-#ifdef FULL_BROWSER_WINDOW
<key id="key_undoCloseTab" command="History:UndoCloseTab" key="&tabCmd.commandkey;" modifiers="accel,shift"/>
-#endif
<key id="key_undoCloseWindow" command="History:UndoCloseWindow" key="&newNavigatorCmd.key;" modifiers="accel,shift"/>
#ifdef XP_GNOME
#define NUM_SELECT_TAB_MODIFIER alt
#else
#define NUM_SELECT_TAB_MODIFIER accel
#endif
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1951,17 +1951,17 @@ if (AppConstants.platform == "macosx") {
// macWindow.inc.xul
gBrowserInit.nonBrowserWindowStartup = function() {
// Disable inappropriate commands / submenus
var disabledItems = ["Browser:SavePage",
"Browser:SendLink", "cmd_pageSetup", "cmd_print", "cmd_find", "cmd_findAgain",
"viewToolbarsMenu", "viewSidebarMenuMenu", "Browser:Reload",
"viewFullZoomMenu", "pageStyleMenu", "charsetMenu", "View:PageSource", "View:FullScreen",
"viewHistorySidebar", "Browser:AddBookmarkAs", "Browser:BookmarkAllTabs",
- "View:PageInfo"];
+ "View:PageInfo", "History:UndoCloseTab"];
var element;
for (let disabledItem of disabledItems) {
element = document.getElementById(disabledItem);
if (element)
element.setAttribute("disabled", "true");
}
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -84,19 +84,17 @@
XPCOMUtils.defineLazyScriptGetter(window,
["PlacesInsertionPoint", "PlacesController", "PlacesControllerDragHelper"],
"chrome://browser/content/places/controller.js");
</script>
# All sets except for popupsets (commands, keys, stringbundles and broadcasters)
# *must* go into the browser-sets.inc file so that they can be shared with other
# top level windows in macWindow.inc.xul.
-#define FULL_BROWSER_WINDOW
#include browser-sets.inc
-#undef FULL_BROWSER_WINDOW
<popupset id="mainPopupSet">
<menupopup id="tabContextMenu"
onpopupshowing="if (event.target == this) TabContextMenu.updateContextMenu(this);"
onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;">
<menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;"
oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/>
<menuitem id="context_toggleMuteTab" oncommand="TabContextMenu.contextTab.toggleMuteAudio();"/>