From 85235da6b3a1d6055fc221b5fa5d6d8aaf81d25e Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 30 Mar 2011 12:17:30 +0000 Subject: [PATCH] - Set sync icon to spinning or not at pane/tab open - Update file sync progress bar in tab --- chrome/content/zotero/xpcom/storage.js | 3 ++- chrome/content/zotero/zoteroPane.js | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js index 03feeb645..366be0bd2 100644 --- a/chrome/content/zotero/xpcom/storage.js +++ b/chrome/content/zotero/xpcom/storage.js @@ -1804,7 +1804,8 @@ Zotero.Sync.Storage.QueueManager = new function () { var enumerator = wm.getEnumerator("navigator:browser"); while (enumerator.hasMoreElements()) { var win = enumerator.getNext(); - var doc = win.document; + if (!win.ZoteroPane) continue; + var doc = win.ZoteroPane.document; // // TODO: Move to overlay.js? diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 99e1deaca..5cfc1cf06 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -405,6 +405,16 @@ var ZoteroPane = new function() }, 1000); } + // Set sync icon to spinning or not + // + // We don't bother setting an error state at open + if (Zotero.Sync.Server.syncInProgress || Zotero.Sync.Storage.syncInProgress) { + Zotero.Sync.Runner.setSyncIcon('animate'); + } + else { + Zotero.Sync.Runner.setSyncIcon(); + } + return true; }