Missing data directory tweaks
- Fix "Locate" button - Don't offer "Restart Later" option after selecting new location - Show "Quit" instead of "OK"
This commit is contained in:
parent
859c506913
commit
13283b008d
2 changed files with 8 additions and 5 deletions
|
@ -124,7 +124,7 @@ Zotero.DataDirectory = {
|
|||
}
|
||||
// For other custom directories that don't exist, show not-found dialog
|
||||
else {
|
||||
Zotero.debug("Custom data directory ${file} not found", 1);
|
||||
Zotero.debug(`Custom data directory ${file} not found`, 1);
|
||||
throw { name: "NS_ERROR_FILE_NOT_FOUND" };
|
||||
}
|
||||
}
|
||||
|
@ -264,7 +264,9 @@ Zotero.DataDirectory = {
|
|||
var fp = Components.classes["@mozilla.org/filepicker;1"]
|
||||
.createInstance(nsIFilePicker);
|
||||
fp.init(win, Zotero.getString('dataDir.selectDir'), nsIFilePicker.modeGetFolder);
|
||||
fp.displayDirectory = Zotero.File.pathToFile(this.dir);
|
||||
fp.displayDirectory = Zotero.File.pathToFile(
|
||||
this._dir ? this._dir : OS.Path.dirname(this.defaultDir)
|
||||
);
|
||||
fp.appendFilters(nsIFilePicker.filterAll);
|
||||
if (fp.show() == nsIFilePicker.returnOK) {
|
||||
var file = fp.file;
|
||||
|
|
|
@ -295,7 +295,7 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
|
|||
_startupErrorHandler = function() {
|
||||
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].
|
||||
createInstance(Components.interfaces.nsIPromptService);
|
||||
var buttonFlags = (ps.BUTTON_POS_0) * (ps.BUTTON_TITLE_OK)
|
||||
var buttonFlags = (ps.BUTTON_POS_0) * (ps.BUTTON_TITLE_IS_STRING)
|
||||
+ (ps.BUTTON_POS_1) * (ps.BUTTON_TITLE_IS_STRING)
|
||||
+ (ps.BUTTON_POS_2) * (ps.BUTTON_TITLE_IS_STRING);
|
||||
// TEMP: lastDataDir can be removed once old persistent descriptors have been
|
||||
|
@ -305,7 +305,8 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
|
|||
Zotero.getString('general.error'),
|
||||
Zotero.startupError + '\n\n' +
|
||||
Zotero.getString('dataDir.previousDir') + ' ' + previousDir,
|
||||
buttonFlags, null,
|
||||
buttonFlags,
|
||||
Zotero.getString('general.quit'),
|
||||
Zotero.getString('dataDir.useDefaultLocation'),
|
||||
Zotero.getString('general.locate'),
|
||||
null, {});
|
||||
|
@ -316,7 +317,7 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
|
|||
}
|
||||
// Locate data directory
|
||||
else if (index == 2) {
|
||||
Zotero.DataDirectory.choose();
|
||||
Zotero.DataDirectory.choose(true);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue