Re: [Gimp-developer] PF_ENUM, SF_ENUM, dynamically defined enums for plugins

2022-08-15 Thread Jehan Pagès via gimp-developer-list
Hi all! On Mon, Aug 15, 2022 at 12:25 AM Ofnuts via gimp-developer-list < gimp-developer-list@gnome.org> wrote: > I'm not convinced this needs to be an enum. The basic problem it to > show a list of strings, and return the index of the selected one. The > contents of the list can be quite

Re: [Gimp-developer] PF_ENUM, SF_ENUM, dynamically defined enums for plugins

2022-08-15 Thread Lloyd Konneker via gimp-developer-list
Yes, the proposal seems to have been shot down already. I don't think it will work. See a discussion https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/709 I paraphrase here and might not be accurately describing things The primary goal is to let plugin authors refer to enums

Re: [Gimp-developer] PF_ENUM, SF_ENUM, dynamically defined enums for plugins

2022-08-15 Thread Ofnuts via gimp-developer-list
Not really. With the current interface, I manage it that way: I have these two functions: def createOpts(name,pairs):     optsclass=namedtuple(name+'Type',[symbol for symbol,label in pairs]+['labels','labelTuples'])     opts=optsclass(*(     range(len(pairs))