www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 13283b008d1b118707bbf8f3da424223ddaaa055
parent 859c506913feb1ba14a010a69ad043d2f3e6c3c1
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat, 17 Jun 2017 22:14:02 -0400

Missing data directory tweaks

- Fix "Locate" button
- Don't offer "Restart Later" option after selecting new location
- Show "Quit" instead of "OK"

Diffstat:
Mchrome/content/zotero/xpcom/dataDirectory.js | 6++++--
Mchrome/content/zotero/xpcom/zotero.js | 7++++---
2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/chrome/content/zotero/xpcom/dataDirectory.js b/chrome/content/zotero/xpcom/dataDirectory.js @@ -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; diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -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;