--- On Fri, 10/10/08, Chris Mohler <[EMAIL PROTECTED]> wrote:

> From: Chris Mohler <[EMAIL PROTECTED]>
> Subject: Re: [Gimp-developer] A question about python gimpfu - "home folder"
> To: [EMAIL PROTECTED]
> Cc: "gimp" <gimp-developer@lists.xcf.berkeley.edu>
> Date: Friday, October 10, 2008, 4:09 PM
> On Fri, Oct 10, 2008 at 2:56 PM, paul taney
> <[EMAIL PROTECTED]> wrote:
> >
> >> Instead of
> >> getting a GUI file chooser, the main plug-in
> function is
> >> executed, and
> >> the the name of the currently selected palette is
> passed
> >> instead of
> >> "this_file"
> >>
> >> Attaching to another menu (<Toolbox>/Xtns/,
> for
> >> example) works as expected.
> >
> > I didnt find it (where is this menu?)...
> >
> > Maybe a pallette or something is passed by default and
> you have to have a placeholder for it -- as with (image,
> drawable) when it lives at <Image>.
> >
> > def test_attach(p, this_file):
> >    print "Test type(p): " + type(p)
> >    print "Test file: " + this_file
> 
> D'oh! - you are correct.  I had to add a parameter when
> registering:
>     [
>         (PF_PALETTE, "palette", 
> _("Palette"), ""),
>         (PF_FILE, "this_file",
> _("File"), ""),
>     ]
> 
> That seems odd to me - is this behavior documented
> somewhere?

I guessed :-)

Not on  http://www.gimp.org/docs/python/index.html  
Use the Aussie spelling to look for "palette".
2 occurances. 

Is there other gimpfu documentation?  This is dated July 1999.

paul

> >
> >
> > BTW, I have noticed that this fails "trying to
> convert to Unicode".
> >
> >    (PF_FILENAME, "filename", "Output
> file:", \
> >    os.path.expanduser("~/tmp.svg")),  #
> fails
> 
> Not sure about that - would something like this work (does
> on linux):
> print os.path.join((os.getenv('HOME')),
> 'tmp')
> 
> Chris
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Reply via email to