Re: Improvement for measurement tool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 6, 2009 at 2:55 PM, Sven Neumann<sven@xxxxxxxx> 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 endedup using help(gimpfu.register) in the console).  I've pasted the newregister() below - one thing seemed strange: the 'params' parameterseems to require that I add the current image and drawable - is thatcorrect?  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 tothe 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 listGimp-developer@xxxxxxxxxxxxxxxxxxxxxxxxxxx://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux