commit 41d8b7b34108d772c79eafadf69de33fa278e039
parent 12229b3509944a8f5e4d94a21077317f5d239952
Author: Simon Kornblith <simon@simonster.com>
Date: Sat, 4 Apr 2009 07:07:55 +0000
-addresses #1213, Bibliography customization broken (change to plug-in also needed)
-uses blocking IO to send integration responses to fix problems with very large documents on slow machines
Diffstat:
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/chrome/content/zotero/editBibliographyDialog.js b/chrome/content/zotero/editBibliographyDialog.js
@@ -139,6 +139,7 @@ var Zotero_Bibliography_Dialog = new function () {
if(_lastSelectedItem && editor.value != _originalBibEntry) {
Zotero.debug("setting bibliography for "+_lastSelectedItem.getID()+" to "+editor.value);
_lastSelectedItem.setProperty("bibliography-Integration", editor.value);
+ _lastSelectedItem.setProperty("bibliography-RTF", editor.value);
}
editor.readonly = !item;
diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js
@@ -232,7 +232,7 @@ Zotero.Integration.SocketListener = new function() {
function onSocketAccepted(socket, transport) {
// get an input stream
var iStream = transport.openInputStream(0, 0, 0);
- var oStream = transport.openOutputStream(0, 0, 0);
+ var oStream = transport.openOutputStream(0, 0, Components.interfaces.nsITransport.OPEN_BLOCKING);
var dataListener = new Zotero.Integration.DataListener(iStream, oStream);
var pump = Components.classes["@mozilla.org/network/input-stream-pump;1"]
@@ -389,9 +389,6 @@ Zotero.Integration.DataListener.prototype._requestFinished = function(response)
// write response
intlStream.writeString(response);
- } catch(e) {
- Zotero.debug("An error occurred.");
- Zotero.debug(e);
} finally {
intlStream.close();
}
@@ -1276,7 +1273,7 @@ Zotero.Integration.Session.prototype.updateItemSet = function() {
var itemID = item.id;
// see if items were removed
- if(!this.citationsByItemID[itemID] && !this.uncitedItems[itemID]) {
+ if(!this.citationsByItemID[itemID] && !this.uncitedItems[item.key]) {
deleteItems.push(itemID);
continue;
}
@@ -1495,6 +1492,7 @@ Zotero.Integration.Session.prototype.loadBibliographyData = function(json) {
if (!item) {
continue;
}
+ item.setProperty("bibliography-Integration", documentData.custom[itemID]);
item.setProperty("bibliography-RTF", documentData.custom[itemID]);
}
}