diff options
Diffstat (limited to 'components/preferences/in-content/main.js')
-rw-r--r-- | components/preferences/in-content/main.js | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/components/preferences/in-content/main.js b/components/preferences/in-content/main.js index bac771b..510bf73 100644 --- a/components/preferences/in-content/main.js +++ b/components/preferences/in-content/main.js @@ -78,18 +78,6 @@ var gMainPane = { setEventListener("chooseFolder", "command", gMainPane.chooseFolder); - if (AppConstants.MOZ_DEV_EDITION) { - let uAppData = OS.Constants.Path.userApplicationDataDir; - let ignoreSeparateProfile = OS.Path.join(uAppData, "ignore-dev-edition-profile"); - - setEventListener("separateProfileMode", "command", gMainPane.separateProfileModeChange); - let separateProfileModeCheckbox = document.getElementById("separateProfileMode"); - setEventListener("getStarted", "click", gMainPane.onGetStarted); - - OS.File.stat(ignoreSeparateProfile).then(() => separateProfileModeCheckbox.checked = false, - () => separateProfileModeCheckbox.checked = true); - } - // Notify observers that the UI is now ready Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService) @@ -101,57 +89,6 @@ var gMainPane = { // **STUB** }, - separateProfileModeChange: function () - { - if (AppConstants.MOZ_DEV_EDITION) { - function quitApp() { - Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestartNotSameProfile); - } - function revertCheckbox(error) { - separateProfileModeCheckbox.checked = !separateProfileModeCheckbox.checked; - if (error) { - Cu.reportError("Failed to toggle separate profile mode: " + error); - } - } - function createOrRemoveSpecialDevEditionFile(onSuccess) { - let uAppData = OS.Constants.Path.userApplicationDataDir; - let ignoreSeparateProfile = OS.Path.join(uAppData, "ignore-dev-edition-profile"); - - if (separateProfileModeCheckbox.checked) { - OS.File.remove(ignoreSeparateProfile).then(onSuccess, revertCheckbox); - } else { - OS.File.writeAtomic(ignoreSeparateProfile, new Uint8Array()).then(onSuccess, revertCheckbox); - } - } - - let separateProfileModeCheckbox = document.getElementById("separateProfileMode"); - let button_index = confirmRestartPrompt(separateProfileModeCheckbox.checked, - 0, false, true); - switch (button_index) { - case CONFIRM_RESTART_PROMPT_CANCEL: - revertCheckbox(); - return; - case CONFIRM_RESTART_PROMPT_RESTART_NOW: - const Cc = Components.classes, Ci = Components.interfaces; - let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"] - .createInstance(Ci.nsISupportsPRBool); - Services.obs.notifyObservers(cancelQuit, "quit-application-requested", - "restart"); - if (!cancelQuit.data) { - createOrRemoveSpecialDevEditionFile(quitApp); - return; - } - - // Revert the checkbox in case we didn't quit - revertCheckbox(); - return; - case CONFIRM_RESTART_PROMPT_RESTART_LATER: - createOrRemoveSpecialDevEditionFile(); - return; - } - } - }, - onGetStarted: function (aEvent) { if (AppConstants.MOZ_DEV_EDITION) { const Cc = Components.classes, Ci = Components.interfaces; |