Don't use modal dialogs in integration
Should fix http://forums.zotero.org/discussion/9078/reproducible-hang-adding-bibliographic-entry-while-openoffice-plugin-addedit-open-box-is-open/#Item_0
This commit is contained in:
parent
3941dd911a
commit
9665d14a18
1 changed files with 16 additions and 19 deletions
|
@ -859,10 +859,11 @@ Zotero.Integration.Session.prototype.setDocPrefs = function(primaryFieldType, se
|
||||||
io.secondaryFieldType = secondaryFieldType;
|
io.secondaryFieldType = secondaryFieldType;
|
||||||
}
|
}
|
||||||
|
|
||||||
Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
var window = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||||
.getService(Components.interfaces.nsIWindowWatcher)
|
.getService(Components.interfaces.nsIWindowWatcher)
|
||||||
.openWindow(null, 'chrome://zotero/content/integration/integrationDocPrefs.xul', '',
|
.openWindow(null, 'chrome://zotero/content/integration/integrationDocPrefs.xul', '',
|
||||||
'chrome,modal,centerscreen', io, true);
|
'chrome,centerscreen', io, true);
|
||||||
|
while(!window.closed) Zotero.mainThread.processNextEvent(true);
|
||||||
if(!io.style) throw new Zotero.Integration.UserCancelledException();
|
if(!io.style) throw new Zotero.Integration.UserCancelledException();
|
||||||
|
|
||||||
// set data
|
// set data
|
||||||
|
@ -895,10 +896,11 @@ Zotero.Integration.Session.prototype.reselectItem = function(exception) {
|
||||||
io.addBorder = Zotero.isWin;
|
io.addBorder = Zotero.isWin;
|
||||||
io.singleSelection = true;
|
io.singleSelection = true;
|
||||||
|
|
||||||
Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
var window = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||||
.getService(Components.interfaces.nsIWindowWatcher)
|
.getService(Components.interfaces.nsIWindowWatcher)
|
||||||
.openWindow(null,'chrome://zotero/content/selectItemsDialog.xul', '',
|
.openWindow(null,'chrome://zotero/content/selectItemsDialog.xul', '',
|
||||||
'chrome,modal,centerscreen,resizable', io, true);
|
'chrome,centerscreen,resizable', io, true);
|
||||||
|
while(!window.closed) Zotero.mainThread.processNextEvent(true);
|
||||||
|
|
||||||
if(io.dataOut && io.dataOut.length) {
|
if(io.dataOut && io.dataOut.length) {
|
||||||
var itemID = io.dataOut[0];
|
var itemID = io.dataOut[0];
|
||||||
|
@ -1249,13 +1251,11 @@ Zotero.Integration.Session.prototype.editCitation = function(index, noteIndex, c
|
||||||
return me.previewCitation(io.citation);
|
return me.previewCitation(io.citation);
|
||||||
}
|
}
|
||||||
|
|
||||||
Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
var window = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||||
.getService(Components.interfaces.nsIWindowWatcher)
|
.getService(Components.interfaces.nsIWindowWatcher)
|
||||||
.openWindow(
|
.openWindow(null, 'chrome://zotero/content/integration/addCitationDialog.xul', '',
|
||||||
null, 'chrome://zotero/content/integration/addCitationDialog.xul', '',
|
'chrome,centerscreen,resizable', io);
|
||||||
'chrome,modal,centerscreen,resizable',
|
while(!window.closed) Zotero.mainThread.processNextEvent(true);
|
||||||
io
|
|
||||||
);
|
|
||||||
|
|
||||||
if(citation && !io.citation.citationItems.length) {
|
if(citation && !io.citation.citationItems.length) {
|
||||||
io.citation = citation;
|
io.citation = citation;
|
||||||
|
@ -1396,14 +1396,11 @@ Zotero.Integration.Session.prototype.editBibliography = function() {
|
||||||
|
|
||||||
this.bibliographyDataHasChanged = this.bibliographyHasChanged = true;
|
this.bibliographyDataHasChanged = this.bibliographyHasChanged = true;
|
||||||
|
|
||||||
Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
var window = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||||
.getService(Components.interfaces.nsIWindowWatcher)
|
.getService(Components.interfaces.nsIWindowWatcher)
|
||||||
.openWindow(
|
.openWindow(null, 'chrome://zotero/content/integration/editBibliographyDialog.xul', '',
|
||||||
null, 'chrome://zotero/content/integration/editBibliographyDialog.xul', '',
|
'chrome,centerscreen,resizable', io, true);
|
||||||
'chrome,modal,centerscreen,resizable',
|
while(!window.closed) Zotero.mainThread.processNextEvent(true);
|
||||||
io,
|
|
||||||
true
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue