On Fri, Oct 10, 2008 at 2:28 AM, David Gowers <[EMAIL PROTECTED]> wrote:
>> And (in the interest of being a pest) a follow-up:
>> Can I attach a plug-in to the Palettes sub-menu?
> Other python plugins, like the 'Sort palette' plugin, certainly do.

Hmm - I can't seem to figure this out.  When I register a plug-in on
the Palettes menu, the 'PF_FILE' parameter seems to be ignored.  Can
someone please take a look at the attached test script?  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

Attaching to another menu (<Toolbox>/Xtns/, for example) works as expected.

#!/usr/bin/env python

from gimpfu import *

gettext.install("gimp20-python", gimp.locale_directory, unicode=True)

def test_attach(this_file):
    print "Test file: " + this_file

    "Test of PF_FILE from palettes menu",
    "Test of PF_FILE from palettes menu",
    "Chris Mohler",
    "Chris Mohler",
        (PF_FILE, "this_file", _("File"), ""),
    domain=("gimp20-python", gimp.locale_directory)

Gimp-developer mailing list

Reply via email to