From 40abd18895bf33fae498a37118bc3ab443379886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Fri, 14 Oct 2016 16:21:48 +0300 Subject: [PATCH] Add a zoteroPane progress window and use for feed translation --- chrome/content/zotero/xpcom/data/feedItem.js | 3 ++- chrome/content/zotero/zoteroPane.js | 4 ++++ translators | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/feedItem.js b/chrome/content/zotero/xpcom/data/feedItem.js index 5c3a1558be..1200f91be3 100644 --- a/chrome/content/zotero/xpcom/data/feedItem.js +++ b/chrome/content/zotero/xpcom/data/feedItem.js @@ -217,7 +217,8 @@ Zotero.FeedItem.prototype.translate = Zotero.Promise.coroutine(function* (librar let deferred = Zotero.Promise.defer(); let error = function(e) { Zotero.debug(e, 1); deferred.reject(e); }; let translate = new Zotero.Translate.Web(); - let progressWindow = new Zotero.ProgressWindow(); + var win = Services.wm.getMostRecentWindow("navigator:browser"); + let progressWindow = win.ZoteroPane.progressWindow; if (libraryID) { // Show progress notifications when scraping to a library. diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index c7d3fcbb82..245d0ad880 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -32,6 +32,7 @@ var ZoteroPane = new function() var _unserialized = false; this.collectionsView = false; this.itemsView = false; + this.progressWindow = false; this._listeners = {}; this.__defineGetter__('loaded', function () _loaded); var _lastSelectedItems = []; @@ -148,6 +149,9 @@ var ZoteroPane = new function() ZoteroPane_Local.setItemsPaneMessage(Zotero.getString('pane.items.loading')); + // Add a default progress window + ZoteroPane_Local.progressWindow = new Zotero.ProgressWindow(window); + //Initialize collections view ZoteroPane_Local.collectionsView = new Zotero.CollectionTreeView(); // Handle an error in setTree()/refresh() diff --git a/translators b/translators index e04633baea..4273554afc 160000 --- a/translators +++ b/translators @@ -1 +1 @@ -Subproject commit e04633baeaac2c62eddb4435e517ae7d51c89a73 +Subproject commit 4273554afc20fe593b30faa6196edac9e755a7fa