From 840ecb5262c7330f98f37460b9a209d80407d91c Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Wed, 5 Feb 2020 13:52:28 -0500 Subject: Issue #65 - Remove AppConstants from toolkit/profile --- toolkit/profile/content/createProfileWizard.js | 14 ++++++-------- toolkit/profile/content/profileSelection.js | 6 +++--- 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'toolkit/profile/content') diff --git a/toolkit/profile/content/createProfileWizard.js b/toolkit/profile/content/createProfileWizard.js index 14d006b31..f13eb8faa 100644 --- a/toolkit/profile/content/createProfileWizard.js +++ b/toolkit/profile/content/createProfileWizard.js @@ -5,8 +5,6 @@ const C = Components.classes; const I = Components.interfaces; -Components.utils.import("resource://gre/modules/AppConstants.jsm"); - const ToolkitProfileService = "@mozilla.org/toolkit/profile-service;1"; var gProfileService; @@ -118,12 +116,12 @@ function checkCurrentInput(currentInput) if (!errorMessage) { finishText.className = ""; - if (AppConstants.platform == "macosx") { - finishText.firstChild.data = gProfileManagerBundle.getString("profileFinishTextMac"); - } - else { - finishText.firstChild.data = gProfileManagerBundle.getString("profileFinishText"); - } + finishText.firstChild.data = gProfileManagerBundle +#ifdef XP_MACOSX + .getString("profileFinishTextMac"); +#else + .getString("profileFinishText"); +#endif canAdvance = true; } else { diff --git a/toolkit/profile/content/profileSelection.js b/toolkit/profile/content/profileSelection.js index 02b9d6873..65a2ba13f 100644 --- a/toolkit/profile/content/profileSelection.js +++ b/toolkit/profile/content/profileSelection.js @@ -4,7 +4,6 @@ * 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/. */ -Components.utils.import("resource://gre/modules/AppConstants.jsm"); Components.utils.import("resource://gre/modules/Services.jsm"); const C = Components.classes; @@ -134,9 +133,10 @@ function onProfilesKey(aEvent) { switch ( aEvent.keyCode ) { +#ifndef XP_MACOSX case KeyEvent.DOM_VK_BACK_SPACE: - if (AppConstants.platform != "macosx") - break; + break; +#endif case KeyEvent.DOM_VK_DELETE: ConfirmDelete(); break; -- cgit v1.2.3