Commit Graph

2 Commits

Author SHA1 Message Date
Jehan d670ff9f82 libgimpbase, libgimpwidgets: add a concept of insensitive choices in GimpChoice.
This is used in the generated GUIs for GimpChoice arguments, but also for
validation of property setting.

New functions:

* gimp_choice_set_sensitive()
* gimp_string_combo_box_set_sensitivity()
2023-10-01 20:52:02 +02:00
Jehan 7e6b01a4e5 libgimpbase: new GimpChoice class meant to represent a list of allowed values.
This will be used for creating limited lists of strings as argument types for
procedures.
Ideally enums are the best type for this, but it can only be used for generic
libgimp* enum types, not custom enums created only for a given plug-in. For
this, we currently just demote the args to ints which lose any semantic. A
limited list of string will give back some semantic and some better validation,
even though it's a tiny bit more annoying to work with strings than int types
(at least in C).
2023-10-01 20:52:02 +02:00