On 11/30/17 2:30 PM, Brenton Wiernik wrote:
> Another question, I'm having a hard time adding menu items to the
> zotero-doi-menu popup in itembox.xml. Just calling <popup
> id="zotero-doi-menu"> or <menupopup id="zotero-doi-menu"> from my
> overlay.xul to add items to the menu doesn't work the way that it does
> for zotero-itemmenu, zotero-collectionmenu, etc. Is there another
> method I need to use to modify that popup?
I don't think a normal XUL overlay will work for an XBL binding, so
you'd probably need to do it in code, possibly using
._id('zotero-doi-menu') on the item box to get that element. Not sure if
that content is torn down between views, but if so you might need to
alter it whenever it's reinitialized.
> Is there a function to replace the progress window text, rather than
> append it? I'd like to replace the description with "Item X of Y",
> etc. as it iterates over the list of selected items, but don't need to
> display item titles or other data—I'd rather not show 200 lines in the
> window if the user selects a large number of items.
Have you looked at the object-oriented version of that API?
https://github.com/zotero/zotero/blob/816fb52b76cff576f7eedc7bae568d66c4464d2b/chrome/content/zotero/fileInterface.js#L345