Bug 1228655 - Remove ifdefs for gEditUIVisible. r=Gijs

This commit is contained in:
Felipe Gomes 2015-12-01 20:05:36 -02:00
parent 18d5249bdd
commit 8aeaf5387b
3 changed files with 15 additions and 15 deletions

View File

@ -63,9 +63,8 @@ var CustomizationHandler = {
gHomeButton.updateTooltip();
XULBrowserWindow.init();
#ifndef XP_MACOSX
updateEditUIVisibility();
#endif
if (AppConstants.platform != "macosx")
updateEditUIVisibility();
// Hacky: update the PopupNotifications' object's reference to the iconBox,
// if it already exists, since it may have changed if the URL bar was

View File

@ -104,9 +104,9 @@ var gAppInfo = Cc["@mozilla.org/xre/app-info;1"]
.getService(Ci.nsIXULAppInfo)
.QueryInterface(Ci.nsIXULRuntime);
#ifndef XP_MACOSX
var gEditUIVisible = true;
#endif
if (AppConstants.platform != "macosx") {
var gEditUIVisible = true;
}
[
["gBrowser", "content"],
@ -1309,12 +1309,12 @@ var gBrowserInit = {
// unless there are downloads to be displayed.
DownloadsButton.initializeIndicator();
#ifndef XP_MACOSX
updateEditUIVisibility();
let placesContext = document.getElementById("placesContext");
placesContext.addEventListener("popupshowing", updateEditUIVisibility, false);
placesContext.addEventListener("popuphiding", updateEditUIVisibility, false);
#endif
if (AppConstants.platform != "macosx") {
updateEditUIVisibility();
let placesContext = document.getElementById("placesContext");
placesContext.addEventListener("popupshowing", updateEditUIVisibility, false);
placesContext.addEventListener("popuphiding", updateEditUIVisibility, false);
}
LightWeightThemeWebInstaller.init();
@ -3967,7 +3967,9 @@ function BrowserCustomizeToolbar() {
*/
function updateEditUIVisibility()
{
#ifndef XP_MACOSX
if (AppConstants.platform == "macosx")
return;
let editMenuPopupState = document.getElementById("menu_EditPopup").state;
let contextMenuPopupState = document.getElementById("contentAreaContextMenu").state;
let placesContextMenuPopupState = document.getElementById("placesContext").state;
@ -4001,7 +4003,6 @@ function updateEditUIVisibility()
goSetCommandEnabled("cmd_delete", true);
goSetCommandEnabled("cmd_switchTextDirection", true);
}
#endif
}
/**

View File

@ -79,7 +79,7 @@ browser.jar:
* content/browser/browser.xul (content/browser.xul)
content/browser/browser-addons.js (content/browser-addons.js)
content/browser/browser-ctrlTab.js (content/browser-ctrlTab.js)
* content/browser/browser-customization.js (content/browser-customization.js)
content/browser/browser-customization.js (content/browser-customization.js)
content/browser/browser-data-submission-info-bar.js (content/browser-data-submission-info-bar.js)
* content/browser/browser-devedition.js (content/browser-devedition.js)
content/browser/browser-eme.js (content/browser-eme.js)