[referencer] lyx plugin

John Spray jcspray at icculus.org
Sat Jan 5 13:02:17 EST 2008


On Sat, 2008-01-05 at 13:13 +0100, Aurélien Naldi wrote:

> * the plugin does not set it's icon. I could add one more field for
> this, defaulting to stock:execute as now. Being limited to stock icons
> would be a good start, especially as we would have to deal with
> dependencies/installation for non-stock ones.

I'd be happy with letting the plugins give an icon name relative to the
referencer data directory, and looking it up in
onEanbledpluginsPrefChanged using Utility::findDataFile.  Obviously it's
not very useful for third-party plugins, but for stuff included in
referencer it'll do.  An empty string would mean "use some default
icon", which could be the stock execute icon as it is now.

The UI should go into the Documents menu as well as the toolbar, I think
-- that should just require adding a bit to the UI XML.

> Do you have any other problem with it, or is it ok to go in once you
> have a working python class for documents ?

I've committed it, with a couple of naming changes, and modified it (as
well as the metadata plugin stuff) to use a python document class
(PythonDocument.[Ch]).  It's getting the keys correctly, but I'm getting
"no pipe defined. Is lyx configured ?".  Could be because I never set
the pipe location explicity that lyx is using a default location which
isn't stored in the config file?

I've sorted the sensitivity issue by moving the plugin ui initialisation
out of constructMenu and to the end of constructUI, so that it's set up
after docview_ and can query whether any docs are selected.

In the spirit of emulating every other maintainer I've ever had to deal
with, I'm nitpicking coding style.  In if statements, please keep the
"{" on the same line as the if, not on the next line.

Todos before release:
      * Show UI for exceptions raised by python plugins
      * Sort out sensitivity and icons for document action plugins
      * Add a bunch of checking in python calls for correct types etc,
        and give errors for bad plugins rather than segfaulting.

Good stuff.

John




More information about the referencer mailing list