diff --git a/application/basilisk/base/content/aboutDialog.js b/application/basilisk/base/content/aboutDialog.js index 44c104f3e0..17fd6123c1 100644 --- a/application/basilisk/base/content/aboutDialog.js +++ b/application/basilisk/base/content/aboutDialog.js @@ -6,7 +6,6 @@ // Services = object with smart getters for common XPCOM services Components.utils.import("resource://gre/modules/Services.jsm"); -Components.utils.import("resource://gre/modules/AppConstants.jsm"); function init(aEvent) { @@ -69,30 +68,29 @@ function init(aEvent) let arch = bundle.GetStringFromName(archResource); versionField.textContent += ` (${arch})`; - // TODO: when we get rid of appconstants make this check for Unix and not MacOS - if (AppConstants.platform == "linux") { - // If Linux append the toolkit "(GTK2)" or "(GTK3)" - let toolkit = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).widgetToolkit.toUpperCase(); - versionField.textContent += ` (${toolkit})`; - } +#ifdef MOZ_WIDGET_GTK + // If Linux append the toolkit "(GTK2)" or "(GTK3)" + let toolkit = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).widgetToolkit.toUpperCase(); + versionField.textContent += ` (${toolkit})`; +#endif // Get Release Notes URL from Preferences let releaseNotesURL = Services.prefs.getCharPref("app.releaseNotesURL"); document.getElementById("releasenotes").setAttribute("href", releaseNotesURL); - if (AppConstants.MOZ_UPDATER) { - gAppUpdater = new appUpdater(); +#ifdef MOZ_UPDATER + gAppUpdater = new appUpdater(); - let channelLabel = document.getElementById("currentChannel"); - let currentChannelText = document.getElementById("currentChannelText"); - channelLabel.value = UpdateUtils.UpdateChannel; - if (/^release($|\-)/.test(channelLabel.value)) - currentChannelText.hidden = true; - } + let channelLabel = document.getElementById("currentChannel"); + let currentChannelText = document.getElementById("currentChannelText"); + channelLabel.value = UpdateUtils.UpdateChannel; + if (/^release($|\-)/.test(channelLabel.value)) + currentChannelText.hidden = true; +#endif - if (AppConstants.platform == "macosx") { - // it may not be sized at this point, and we need its width to calculate its position - window.sizeToContent(); - window.moveTo((screen.availWidth / 2) - (window.outerWidth / 2), screen.availHeight / 5); - } +#ifdef XP_MACOSX + // it may not be sized at this point, and we need its width to calculate its position + window.sizeToContent(); + window.moveTo((screen.availWidth / 2) - (window.outerWidth / 2), screen.availHeight / 5); +#endif } diff --git a/application/basilisk/base/jar.mn b/application/basilisk/base/jar.mn index f982f421b4..5980502881 100644 --- a/application/basilisk/base/jar.mn +++ b/application/basilisk/base/jar.mn @@ -14,9 +14,11 @@ browser.jar: % overlay chrome://global/content/viewSource.xul chrome://browser/content/viewSourceOverlay.xul % overlay chrome://global/content/viewPartialSource.xul chrome://browser/content/viewSourceOverlay.xul +#ifdef MOZ_UPDATER content/browser/aboutDialog-appUpdater.js (content/aboutDialog-appUpdater.js) +#endif * content/browser/aboutDialog.xul (content/aboutDialog.xul) - content/browser/aboutDialog.js (content/aboutDialog.js) +* content/browser/aboutDialog.js (content/aboutDialog.js) content/browser/aboutDialog.css (content/aboutDialog.css) * content/browser/abouthome/aboutHome.xhtml (content/abouthome/aboutHome.xhtml) content/browser/abouthome/aboutHome.js (content/abouthome/aboutHome.js) diff --git a/application/basilisk/base/moz.build b/application/basilisk/base/moz.build index e0fd2ba067..f893cef1a4 100644 --- a/application/basilisk/base/moz.build +++ b/application/basilisk/base/moz.build @@ -3,6 +3,7 @@ # 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/. +DEFINES['MOZ_APP_NAME'] = CONFIG['MOZ_APP_NAME'] DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION'] DEFINES['MOZ_APP_VERSION_DISPLAY'] = CONFIG['MOZ_APP_VERSION_DISPLAY']