[referencer] lyx plugin

Aurélien Naldi aurelien.naldi at gmail.com
Sat Jan 5 13:43:26 EST 2008


Le samedi 05 janvier 2008 à 18:02 +0000, John Spray a écrit :
> 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.
> 

I will have a look at this, the icon you quoted in your other mail is
fine.

> > 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?

Yep, but I'm not sure what is the default behaviour of lyx, does it have
a default path or does it only enable the pipe if the config option is
set ?

Do you have a files named ~/.lyxpipe.in/out or ~/.lyx/lyxpipe.in/out ?
I don't have any of them if I comment out the line from 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.
> 

Great for these two things. Usually, I always let the opening "{" on the
same 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.

All of this would be very nice, but what is the remaining problem with
sensitivity ? Do you want to add a single/multiple document and a custon
sensitivity test before release ? I don't see a problem with this but
without a more complete python API this would be useless. Maybe making a
release to spread the world and encouraging plugin writers to discuss
the API for another release would be better.

I'll do a clean svn checkout to test it and maybe look at the icon and
document menu stuff. Don't expect much though: I'm away on sunday and
back at work next week...

-- 
Aurélien Naldi <aurelien.naldi at gmail.com>




More information about the referencer mailing list