Fix display of missing data directory startup error in Standalone

This commit is contained in:
Simon Kornblith 2014-04-30 14:00:56 -04:00
parent 74ed0879f6
commit 8d807b73c6

View file

@ -330,16 +330,12 @@ Components.utils.import("resource://gre/modules/Services.jsm");
if (e.name == 'NS_ERROR_FILE_NOT_FOUND') {
Zotero.startupError = Zotero.getString('dataDir.notFound');
_startupErrorHandler = function() {
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var win = wm.getMostRecentWindow('navigator:browser');
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].
createInstance(Components.interfaces.nsIPromptService);
var buttonFlags = (ps.BUTTON_POS_0) * (ps.BUTTON_TITLE_OK)
+ (ps.BUTTON_POS_1) * (ps.BUTTON_TITLE_IS_STRING)
+ (ps.BUTTON_POS_2) * (ps.BUTTON_TITLE_IS_STRING);
var index = ps.confirmEx(win,
var index = ps.confirmEx(null,
Zotero.getString('general.error'),
Zotero.startupError + '\n\n' +
Zotero.getString('dataDir.previousDir') + ' '