diff --git a/chrome/content/zotero/standalone/standalone.js b/chrome/content/zotero/standalone/standalone.js index 43b6a40383..8585db8f20 100644 --- a/chrome/content/zotero/standalone/standalone.js +++ b/chrome/content/zotero/standalone/standalone.js @@ -942,23 +942,26 @@ ZoteroStandalone.DebugOutput = { restartEnabled: function () { - var ps = Services.prompt; - var buttonFlags = ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING - + ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL - + ps.BUTTON_POS_2 * ps.BUTTON_TITLE_IS_STRING; - var index = ps.confirmEx( - null, - Zotero.getString('zotero.debugOutputLogging'), - Zotero.getString('zotero.debugOutputLogging.enabledAfterRestart', [Zotero.clientName]), - buttonFlags, - Zotero.getString('general.restartNow'), - null, Zotero.getString('general.restartLater'), null, {} - ); - if (index != 1) { - Zotero.Prefs.set('debug.store', true); - } + var checkbox = { value: true }; + var index = Zotero.Prompt.confirm({ + title: Zotero.getString('zotero.debugOutputLogging'), + text: Zotero.getString('zotero.debugOutputLogging.enabledAfterRestart', [Zotero.clientName]), + button0: Zotero.getString('general-restartApp'), + button1: Services.prompt.BUTTON_TITLE_CANCEL, + checkLabel: Zotero.getString('debug-output-logging-restart-in-troubleshooting-mode-checkbox'), + checkbox, + }); if (index == 0) { - Zotero.Utilities.Internal.quit(true); + Zotero.Prefs.set('debug.store', true); + + // Restart in Troubleshooting Mode + if (checkbox.value) { + Services.startup.restartInSafeMode(Ci.nsIAppStartup.eAttemptQuit); + } + // Restart in normal mode + else { + Zotero.Utilities.Internal.quit(true); + } } }, diff --git a/chrome/locale/en-US/zotero/zotero.ftl b/chrome/locale/en-US/zotero/zotero.ftl index 08c39de8ed..3e6f2f7cff 100644 --- a/chrome/locale/en-US/zotero/zotero.ftl +++ b/chrome/locale/en-US/zotero/zotero.ftl @@ -39,6 +39,8 @@ general-go-back = Go Back general-accept = Accept general-cancel = Cancel general-show-in-library = Show in Library +general-restartApp = Restart { -app-name } +general-restartInTroubleshootingMode = Restart in Troubleshooting Mode citation-style-label = Citation Style: language-label = Language: @@ -412,10 +414,12 @@ licenses-cc-by-nc-sa = Creative Commons Attribution-NonCommercial-ShareAlike 4.0 licenses-cc-more-info = Be sure you have read the Creative Commons Considerations for licensors before placing your work under a CC license. Note that the license you apply cannot be revoked, even if you later choose different terms or cease publishing the work. licenses-cc0-more-info = Be sure you have read the Creative Commons CC0 FAQ before applying CC0 to your work. Please note that dedicating your work to the public domain is irreversible, even if you later choose different terms or cease publishing the work. +debug-output-logging-restart-in-troubleshooting-mode-checkbox = { general-restartInTroubleshootingMode } + restart-in-troubleshooting-mode-menuitem = .label = Restart in Troubleshooting Mode… .accesskey = T -restart-in-troubleshooting-mode-dialog-title = Restart in Troubleshooting Mode +restart-in-troubleshooting-mode-dialog-title = { general-restartInTroubleshootingMode } restart-in-troubleshooting-mode-dialog-description = { -app-name } will restart with all plugins disabled. Some features may not function correctly while Troubleshooting Mode is enabled. menu-ui-density =