Re: [Gimp-developer] plugin defaults - where to put them?

2005-02-13 Thread pcg
On Sun, Feb 13, 2005 at 11:35:05AM -0800, William Skaggs <[EMAIL PROTECTED]> 
wrote:
> > My plugin have various user selectable configuration settings.
> >
> > Right now, I use ~/.gimp-2.2/gimprc to store the defaults.
> >
> > I am not sure if it is correct to fill up gimprc in this way, and no 
> > setting is saved between sessions.
> >
> > So, Is there a better/recommended way for plugins to store such data in the
> > gimp? Is there a recommended practice for saving loading such settings? 
> 
> We are developing a mechanism for plug-ins to save settings and configuration
> information for GIMP 2.4, but there isn't one in 2.2.  Using gimprc will

Actually, gimp-perl does that (or at least did that) since the 1.x days,
by either using gimp_set_data (obsolete) or global persistent parasites,
which has the desired effect.

Gimp::Fu uses that mechanism, so all perl plug-ins using Gimp::Fu als
their UI have persistency for their settings. That has worked without
problems so far.

(Actually both global and per-image defaults, so when opening the same
plug-in on an image it will use the values used before, if possible, or
the global last-recently-used ones).

-- 
The choice of a
  -==- _GNU_
  ==-- _   generation Marc Lehmann
  ---==---(_)__  __   __  [EMAIL PROTECTED]
  --==---/ / _ \/ // /\ \/ /  http://schmorp.de/
  -=/_/_//_/\_,_/ /_/\_\  XX11-RIPE
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] plugin defaults - where to put them?

2005-02-13 Thread Sven Neumann
Hi,

Carol Spears <[EMAIL PROTECTED]> writes:

> what does the pluginrc do?

GIMP caches the procedures registered by the plug-ins there. By doing
that it doesn't need to query the plug-ins on each startup.

> the last time i looked at it, it seemed that gap was making some
> extensive use of this file.

gap registers quite a few plug-ins and procedure calls so it's not
surprising that it shows up there.


Sven
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] plugin defaults - where to put them?

2005-02-13 Thread Carol Spears
On Sun, Feb 13, 2005 at 09:18:18PM +0100, Sven Neumann wrote:
> Pepster <[EMAIL PROTECTED]> writes:
> 
> > My plugin have various user selectable configuration settings.
> >
> > Right now, I use ~/.gimp-2.2/gimprc to store the defaults.
> >
> > I am not sure if it is correct to fill up gimprc in this way, and no
> > setting is saved between sessions.
> >
> > So, Is there a better/recommended way for plugins to store such data
> > in the gimp? Is there a recommended practice for saving loading such
> > settings?
> 
> GIMP 2.4 will provide a framework that allows plug-ins to store their
> settings. For now you will have to either implement it yourself, use
> gimp_gimprc_set() or a global persistent parasite.
> 
what does the pluginrc do?

the last time i looked at it, it seemed that gap was making some
extensive use of this file.

carol

___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] plugin defaults - where to put them?

2005-02-13 Thread Pepster
Thanks for takng care of this issue in 2.4.
BTW, how far is it to 2.4? (approx)
-Joseph
Sven Neumann wrote:
Hi,
Pepster <[EMAIL PROTECTED]> writes:

My plugin have various user selectable configuration settings.
Right now, I use ~/.gimp-2.2/gimprc to store the defaults.
I am not sure if it is correct to fill up gimprc in this way, and no
setting is saved between sessions.
So, Is there a better/recommended way for plugins to store such data
in the gimp? Is there a recommended practice for saving loading such
settings?

GIMP 2.4 will provide a framework that allows plug-ins to store their
settings. For now you will have to either implement it yourself, use
gimp_gimprc_set() or a global persistent parasite.
Sven

___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] plugin defaults - where to put them?

2005-02-13 Thread Sven Neumann
Hi,

Pepster <[EMAIL PROTECTED]> writes:

> My plugin have various user selectable configuration settings.
>
> Right now, I use ~/.gimp-2.2/gimprc to store the defaults.
>
> I am not sure if it is correct to fill up gimprc in this way, and no
> setting is saved between sessions.
>
> So, Is there a better/recommended way for plugins to store such data
> in the gimp? Is there a recommended practice for saving loading such
> settings?

GIMP 2.4 will provide a framework that allows plug-ins to store their
settings. For now you will have to either implement it yourself, use
gimp_gimprc_set() or a global persistent parasite.


Sven
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] plugin defaults - where to put them?

2005-02-13 Thread William Skaggs


Pepster wrote:

> My plugin have various user selectable configuration settings.
>
> Right now, I use ~/.gimp-2.2/gimprc to store the defaults.
>
> I am not sure if it is correct to fill up gimprc in this way, and no 
> setting is saved between sessions.
>
> So, Is there a better/recommended way for plugins to store such data in the
> gimp? Is there a recommended practice for saving loading such settings? 

We are developing a mechanism for plug-ins to save settings and configuration
information for GIMP 2.4, but there isn't one in 2.2.  Using gimprc will
certainly not work.  Right now if you need to do this, the only approach
is for the plug-in to create and read its own files, and there is nothing
that would prevent this.

Best,
  -- Bill
 

 
__ __ __ __
Sent via the CNPRC Email system at primate.ucdavis.edu


 
   
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


[Gimp-developer] plugin defaults - where to put them?

2005-02-13 Thread Pepster
My plugin have various user selectable configuration settings.
Right now, I use ~/.gimp-2.2/gimprc to store the defaults.
I am not sure if it is correct to fill up gimprc in this way, and no setting is 
saved between sessions.

So, Is there a better/recommended way for plugins to store such data in the 
gimp? Is there a recommended practice for saving loading such settings?

Thanks, Joseph
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer