www

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

commit c08354eced4e0dce5d2f6a174dea50b68a73e01e
parent abff9e39ad1195908822a164edb6bcbb07449f92
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue,  6 Dec 2016 05:09:08 -0500

Don't show migration message in a popup in Standalone

Apparently this was happening sometimes, though I'm not sure how.

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

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