On Fri, 2005-06-03 at 09:18 +0200, Dave Neary wrote:
> Hi Jay,
> Jay Cox a écrit :
> > On Thu, 2005-06-02 at 18:41 +0200, Dave Neary wrote:
> >>  - Work on a framework to make plug-in settings saveable across 
> >>sessions (this might be done now, is it?)
> > 
> > Persistent parasites can easily be used for this. Parasites are not the
> > ideal solution and I'm not sure how many plugins use them.
> Parasites are not an ideal solution for this. You would idieally want a 
> GimpPluginSettings object which you can then save/load with 
> gimp_plugin_settings_save|load(). The storage should be a file, or part 
> of the existing gimprc file (given RML's talk on many small files, this 
> might be better). Persistent parasites have a problem - either they're 
> per session or per (image|drawable). If they're per session, then the 
> next time you start up all your plug-ins have reverted to their 
> defaults. If they're per image, then you have to change your defaults 
> for each application.

If you call gimp_parasite_attach() with a parasite that has the
persistent flag set, it will be saved to the parasiterc file and
reloaded the next time you start up gimp.  I can't think of any plugins
that actually do this though...  The downside of parasites is that they
are loaded at startup and are always in memory.  The parasiterc has the
potential to grow indefinitely.

Jay Cox

Gimp-developer mailing list

Reply via email to