Add Troubleshooting Mode checkbox to "Restart with Logging Enabled…"
Add "Restart in Troubleshooting Mode" checkbox, checked by default, and remove "Restart Later" option, since it's not possible to restart later in Troubleshooting Mode. I doubt anyone used that, and if they really need it, they can use -ZoteroDebug at the command line or toggle the `debug.store` pref manually. Closes #4580
This commit is contained in:
parent
35659b599e
commit
ab2880471e
2 changed files with 24 additions and 17 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -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 <a data-l10n-name="license-considerations">Considerations for licensors</a> 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 <a data-l10n-name="license-considerations">CC0 FAQ</a> 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 =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue