www

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

commit bd688f333c488a36d1449f6d8c300d71a48e1b05
parent 39e8b226cb0845aad8714b34d42a8ff4535fd281
Author: Simon Kornblith <simon@simonster.com>
Date:   Tue, 22 Jan 2013 23:05:15 -0500

Merge branch '3.0'

Diffstat:
Mchrome/content/zotero/fileInterface.js | 2+-
Mchrome/content/zotero/xpcom/translation/translate.js | 13+++++++------
Mchrome/content/zotero/xpcom/zotero.js | 2+-
3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js @@ -671,7 +671,7 @@ var Zotero_File_Interface = new function() { .redraw(); // Process redraw event - Zotero.mainThread.processNextEvent(false); + Zotero.wait(0); } finally { // Close nested event queue if(eventQueuePushed) Zotero.mainThread.popEventQueue(); diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js @@ -167,12 +167,13 @@ Zotero.Translate.Sandbox = { */ "loadTranslator":function(translate, type) { const setDefaultHandlers = function(translate, translation) { - if(Zotero.Utilities.isEmpty(translation._handlers)) { - if(type !== "export") { - translation.setHandler("itemDone", function(obj, item) { - translate.Sandbox._itemDone(translate, item); - }); - } + if(type !== "export" + && (!translation._handlers['itemDone'] || !translation._handlers['itemDone'].length)) { + translation.setHandler("itemDone", function(obj, item) { + translate.Sandbox._itemDone(translate, item); + }); + } + if(!translation._handlers['selectItems'] || !translation._handlers['selectItems'].length) { translation.setHandler("selectItems", translate._handlers["selectItems"]); } } diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -1441,7 +1441,7 @@ Components.utils.import("resource://gre/modules/Services.jsm"); * @param {Integer} [timeout=50] Maximum number of milliseconds to wait */ this.wait = function (timeout) { - if (!timeout) { + if (timeout === undefined) { timeout = 50; } var mainThread = Zotero.mainThread;