Don't show migration message in a popup in Standalone

Apparently this was happening sometimes, though I'm not sure how.
This commit is contained in:
Dan Stillman 2016-12-06 05:09:08 -05:00
parent abff9e39ad
commit c08354eced
2 changed files with 12 additions and 5 deletions

View file

@ -576,7 +576,13 @@ Zotero.DataDirectory = {
// This can seemingly fail due to a race condition building the Standalone window,
// so just ignore it if it does
try {
Zotero.showZoteroPaneProgressMeter(Zotero.getString("dataDir.migration.inProgress"));
Zotero.showZoteroPaneProgressMeter(
Zotero.getString("dataDir.migration.inProgress"),
false,
null,
// Don't show message in a popup in Standalone if pane isn't ready
Zotero.iStandalone
);
}
catch (e) {
Zotero.logError(e);

View file

@ -1503,11 +1503,12 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
/**
* Show Zotero pane overlay and progress bar in all windows
*
* @param {String} msg
* @param {Boolean} [determinate=false]
* @param {String} msg
* @param {Boolean} [determinate=false]
* @param {Boolean} [modalOnly=false] - Don't use popup if Zotero pane isn't showing
* @return void
*/
this.showZoteroPaneProgressMeter = function (msg, determinate, icon) {
this.showZoteroPaneProgressMeter = function (msg, determinate, icon, modalOnly) {
// If msg is undefined, keep any existing message. If false/null/"", clear.
// The message is also cleared when the meters are hidden.
_progressMessage = msg = (msg === undefined ? _progressMessage : msg) || "";
@ -1517,7 +1518,7 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
while (enumerator.hasMoreElements()) {
var win = enumerator.getNext();
if(!win.ZoteroPane) continue;
if(!win.ZoteroPane.isShowing()) {
if (!win.ZoteroPane.isShowing() && !modalOnly) {
if (win != currentWindow) {
continue;
}