On Mon, Jul 6, 2009 at 2:55 PM, Sven Neumann<
sven@...> wrote:
> On Sun, 2009-07-05 at 22:42 -0400, Alec Burgess wrote:
>> Bug?: The entry "Filters - Measurement - Path" is always enabled
>> whether or not any path exists (expected) but in Filters-Repeat
>> "Path", Filters-Reshow "Path" and Filters-Recently Used-Path it
>> always shows as Disabled (grayed out).
>> Is this an easy fix?
>
> This might fix itself if you change your script not to use the
> deprecated register() API. You should instead use the variant that
> passes the menu location as value of the named parameter 'menu'. The way
> your script is using register() triggers an obscure backward
> compatibility quirks mode, which is probably not what you want.
I had a little trouble finding docs on the named parameters (I ended
up using help(gimpfu.register) in the console). I've pasted the new
register() below - one thing seemed strange: the 'params' parameter
seems to require that I add the current image and drawable - is that
correct? Any other big mistakes here? ;)
Thanks,
Chris
register(
proc_name=("python-fu-measure-path"),
blurb=("Measure Path"),
help=("Measure Length of the active path. Output is directed to
the Status Bar or Error Console."),
author=("Chris Mohler"),
copyright=("Chris Mohler"),
date=("2009"),
label=("Active Path"),
imagetypes=("*"),
params=[
(PF_IMAGE, "img", "Image", None),
(PF_DRAWABLE, "drw", "Drawable", None)
],
results=[],
function=(measure_path),
menu=("<Image>/Filters/Measure"),
domain=("gimp20-python", gimp.locale_directory)
)
_______________________________________________
Gimp-developer mailing list
Gimp-developer@...
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer