Re: PF_ENUM, SF_ENUM, dynamically defined enums for plugins

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

 



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 symbolically, like
FooEnum.BarValue.

The current implementation is what I call "mock enums."
A plugin registers/declares an argument of type int with a formatted string
in the blurb of the GParamSpecInt.
Something like this "BarValue=0, ZedValue=1".
Then GimpProcedureDialog should (doesn't yet) show it properly as an int
combo box.
The PDBBrowser shows the blurb, so a reader can understand.
The problem is, other plugins (calling this plugin) can't refer to the enum
values symbolically.
The declaring plugin might be able to, but not other plugins.
The other plugs usually just hard-code integer literals like "1."
And if the declaring plugin changes the enum, using plugins might break.
Not a huge problem, since many plugins are never called by other plugins.

See also gimp#8495.

Also see pygobject#541.  An issue  at Gitlab PyGobject project where I ask
whether this proposal might ever work.

BTW, this thread is misnamed.  I am really talking about PF_OPTION and
SF-OPTION.
_______________________________________________
gimp-developer-list mailing list
List address:    gimp-developer-list@xxxxxxxxx
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list



[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